Files
Phraseanet/lib/Alchemy/Phrasea/Search/V1SearchRecordsResultTransformer.php
KallooaSan 00be9e51b0 PHRAS-1895_PORT_PHRAS-1401_include_json_format_return_record (#2494)
* PHRAS-1895_PORT_PHRAS-1401 include json format return record

* PHRAS-1895_rollback deleted action ref PHRAS-1688
2018-02-28 17:31:45 +01:00

29 lines
693 B
PHP

<?php
/*
* This file is part of Phraseanet
*
* (c) 2005-2016 Alchemy
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Alchemy\Phrasea\Search;
class V1SearchRecordsResultTransformer extends V1SearchTransformer
{
/**
* @var RecordTransformer
*/
private $recordTransformer;
public function __construct(RecordTransformer $recordTransformer)
{
$this->recordTransformer = $recordTransformer;
}
public function includeResults(SearchResultView $resultView)
{
return $this->collection($resultView->getRecords(), $this->recordTransformer);
}
}