@param Collection $contentCollection
@param array      $params

@return FacadeInterface
5795
public function transform($contentCollection, array $params = array())
    {
        $facade = $this->newFacade();

        foreach ($contentCollection as $content) {
            $facade->addContent($this->getContext()->transform('content', $content));
        }

        return $facade;
    }
629078
public function resolveCollection($collection, $request = null)
    {
        return $collection->map(function ($item) use ($request) {
            return (new static($item))->toArray($request);
        })->all();
    }
643502
public function collection(Collection $collection, PresentableInterface $presenter)
    {
        foreach ($collection as $key => $value) {
            $collection->put($key, $this->model($value, $presenter));
        }

        return $collection;
    }
1097947
protected function prepareProductCollection(\Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection $collection)
    {
        return $collection;
    }
1355833
public function renderFormFromCollection(ArgumentCollection $collection, $formName = "thelia.empty", $driverCode = null, $addHiddenFields = false)
    {
        $i = 0;
        $content = "";

        // Ensure that the template definition is on the BO
        $this->parser->setTemplateDefinition(TemplateHelper::getInstance()->getActiveAdminTemplate());

        /** @var \IndexEngine\Driver\Configuration\ArgumentInterface $argument */
        foreach ($collection->getArguments() as $argument) {
            if ($argument instanceof ParserAwareArgumentInterface) {
                $argument->setParser($this->parser);
            }

            $formattedTitle = $this->formatTitle($argument->getName());

            $content .= $this->parser->render("form-field/render-form-field.html", [
                "driver_code" => $driverCode,
                "form_name" => $formName,
                "form_field" => $argument->getName(),
                "argument" => $argument,
                "is_vector" => $argument instanceof VectorArgumentInterface,
                "is_view_builder" => $argument instanceof ViewBuilderInterface,
                "is_field_count_even" => $i % 2 === 0,
                "field_count" => $i++,
                "formatted_title" => $formattedTitle,
                "add_hidden_fields" => $addHiddenFields,
            ]);

            $addHiddenFields = false;
        }

        return $content;
    }
1035194
public function createFromCollection(Collection $collection)
    {
        $this->operator = new CollectionOperator($collection, $this->request);
        $this->prepare();

        return $this;
    }
645949
public function newCollectionUpdateStruct(?Collection $collection = null): CollectionUpdateStruct
    {
        $collectionUpdateStruct = new CollectionUpdateStruct();

        if ($collection !== null) {
            $collectionUpdateStruct->offset = $collection->getOffset();
            $collectionUpdateStruct->limit = $collection->getLimit() ?? 0;
        }

        return $collectionUpdateStruct;
    }
153025
public static function get($params = array())
	{
		$object = new static;
		$data   = $object->request('GET', $object->getUrl(), $params);
		$data   = $object->stripResponseData($data);

		// Initialise a collection
		$collection = self::newCollection();

		if (isset($data[0]) && is_array($data[0])) {
			// This should be a collection
			$collection->setItems($data);
		}

		return $collection;
	}
289629
public function setCollection($collection)
    {
        $this->indexedContainer = $collection;

        foreach ($collection as $argModel) {
            $this->hashedContainer[$argModel->getName()] = $argModel;
        }

        return $this;
    }
898930
public function transform($siteCollection, array $params = array())
    {
        $facade = $this->newFacade();

        foreach ($siteCollection as $site) {
            $facade->addSite($this->getContext()->transform('site', $site));
        }

        return $facade;
    }
1001009
public function usePaletteCollection(PaletteCollectionInterface $paletteCollection)
    {
        if ($this->paletteCollection) {
            $this->finishPaletteCollection();
        }

        $event = new UsePaletteCollectionEvent($paletteCollection, $this);
        $this->dispatchEvent($event);
        $this->paletteCollection = $paletteCollection;

        return $this;
    }
1374760
public function transform($nodeTree, array $params = array())
    {
        $facade = $this->newFacade();

        $facade->node = $this->getContext()->transform('node_tree_leaf', $nodeTree['node']);
        if (array_key_exists('child', $nodeTree)) {
            foreach ($nodeTree['child'] as $child) {
                $facade->addChild($this->getContext()->transform('node_tree', $child));
            }
        }

        return $facade;
    }
792705
private function getSectionFilterCriteria(ParameterCollectionInterface $parameterCollection): ?Criterion
    {
        if ($parameterCollection->getParameter('filter_by_section')->getValue() !== true) {
            return null;
        }

        $sections = $parameterCollection->getParameter('sections')->getValue() ?? [];
        if (count($sections) === 0) {
            return null;
        }

        return new Criterion\SectionId($this->getSectionIds($sections));
    }
1227959
public function transform($blockComponentCollection, array $params = array())
    {
        $facade = $this->newFacade();

        foreach ($blockComponentCollection as $blockComponent) {
            $facade->addBlockComponents($this->getContext()->transform('block_component', $blockComponent));
        }

        return $facade;
    }
219586
public function get($params = [])
    {
        $result = $this->connection()->get($this->getEndpoint(), $params);

        return $this->collectionFromResult($result);
    }
163481
public function convertToCollections($requestParams)
    {
        $requiredParams = array("id");
        $options["headers"] = self::retrieveContentTypeHeader(self::CONTENT_TYPE_FORM);
        return $this->client->request($requestParams, $this->_mainTransactionEndpoint . "/" . self::CONVERT_COLLECTIONS, "put", $requiredParams, $options);
    }
1290645
public function transform($trashItemCollection, array $params = array())
    {
        $facade = $this->newFacade();

        foreach ($trashItemCollection as $trashItem) {
            $facade->addElement($this->getContext()->transform('trash_item', $trashItem));
        }

        return $facade;
    }