Создает новую коллекцию помощников вида.
@return IHelperCollection
3050
private function newViewHelperCollectionInstance()
    {
        $viewHelperCollection = $this->getPrototype(
                $this->viewHelperCollectionClass,
                ['umi\templating\extension\helper\collection\IHelperCollection']
            )
            ->createInstance();

        if ($viewHelperCollection instanceof IHelperFactoryAware) {
            $viewHelperCollection->setTemplatingHelperFactory($this->getViewHelperFactory());
        }

        return $viewHelperCollection;
    }
586669
protected function _prepareCollection()
    {
        $collection = Mage::getResourceModel('adyen/event_queue_collection');
        $this->setCollection($collection);
        if (!$this->getParam($this->getVarNameSort())) {
            $collection->setOrder('event_queue_id', 'desc');
        }

        return parent::_prepareCollection();
    }
684161
protected function _collection()
    {
        if (!isset($this->_collections[$this->_collection])) {
            $this->_collections[$this->_collection] = new $this->_collectionClass($this);
        }

        return $this->_collections[$this->_collection];
    }
715471
protected function getListCollectionItem()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            return $this->collection_item->getList(array('limit' => $this->getLimit()));
        }

        if (!is_numeric($id)) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        if ($this->getParam('collection')) {
            return $this->collection_item->getList(array('collection_id' => $id, 'limit' => $this->getLimit()));
        }

        $result = $this->collection_item->get($id);

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($result);
    }
41970
public function refunds()
    {
        if (!isset($this->_links->refunds->href)) {
            return new RefundCollection($this->client, 0, null);
        }

        $result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->refunds->href);

        return ResourceFactory::createCursorResourceCollection(
            $this->client,
            $result->_embedded->refunds,
            Refund::class,
            $result->_links
        );
    }
121658
protected function createCollectionLoader()
    {
        $loader = $this->createCollectionLoaderFromTrait();

        $mainMenu = filter_input(INPUT_GET, 'main_menu', FILTER_SANITIZE_STRING);
        if ($mainMenu) {
            $loader->setCallback(function (&$obj) use ($mainMenu) {
                if (!$obj['main_menu']) {
                    $obj['main_menu'] = $mainMenu;
                }
            });
        }

        return $loader;
    }
315780
public function newCollector()
    {
        $collector = new Collector($this->getDispatcher());

        // Pass services and settings to collector.
        $collector
            ->setCollections($this->_collections)
            ->setLogger($this->getLogger())
            ->setQueue($this->getQueue())
            ->setTimeout($this->_timeout)
            ->setLimit($this->_limit);

        return $collector;
    }
1140871
protected function retrieveCollection()
    {
        $cache = new FilesystemAdapter($this->namespace);
        $item = $cache->getItem('collection');

        $collection = null;
        if ($item->isHit()) {
            $collection = $item->get('collection');
        }

        if (empty($collection) || !$collection instanceof ValuesCollection) {
            $collection = new ValuesCollection();
        }

        return $collection;
    }
23906
public function loadChildren()
    {
        $loader = new CollectionLoader([
            'logger'  => $this->logger,
            'factory' => $this->modelFactory()
        ]);
        $loader->setModel($this);

        $loader->addFilter([
            'property' => 'master',
            'value'      => $this->id()
        ]);
        $loader->addFilter([
            'property' => 'active',
            'value'      => true
        ]);

        $loader->addOrder([
            'property' => 'position',
            'mode'     => 'asc'
        ]);

        return $loader->load();
    }
568267
public static function get(
    ): Collection {
        $googleTaskLists = static::getGoogleTaskLists();
        $googleLists = $googleTaskLists->listTaskLists();

        return collect($googleLists)
            ->map(function (Google_Service_Tasks_TaskList $tasklist) {
                return TaskLists::createFromGoogleTaskLists($tasklist);
            })
            ->sortBy(function (TaskLists $tasklist) {
                return $tasklist->title;
            })
            ->values();
    }
1005799
public function getCollection()
    {
        if (! isset($this->collection)) {
            return str_replace(
                '\\', '', Str::snake(Str::plural(class_basename($this)))
            );
        }

        return $this->collection;
    }
393562
public function collection()
    {
        if ($this->collection) {
            return $this->collection;
        }

        if (!$this->collectionConfig()) {
            throw new Exception(sprintf(
                'Collection Config required for "%s"',
                get_class($this)
            ));
        }

        $collection = new CollectionLoader([
            'logger'  => $this->logger,
            'factory' => $this->modelFactory()
        ]);

        $collection->setModel($this->proto());
        $collection->setData($this->collectionConfig());

        $this->collection = $collection->load();

        return $this->collection;
    }
579891
public function getHelperSet(): HelperSet
	{
		if (!$this->helperSet)
		{
			$this->helperSet = $this->getDefaultHelperSet();
		}

		return $this->helperSet;
	}
1209304
public function collections()
    {
        $uri = $this->uri->withPath($this->uri->getPath() . ':listCollectionIds');
        $value = $this->client->post($uri, null);
        $collections = [];

        foreach ($value['collectionIds'] as $id) {
            $collections[] = $this->collection($id);
        }

        return $collections;
    }
250381
protected function getCollectionsMap()
    {
        if (null == $this->collectionsMap) {
            $this->collectionsMap = $this->repository->getCollectionsMap();
        }
        return $this->collectionsMap;
    }
473660
public function getList()
    {
        $result = $this->execute();
        $list = new ArrayCollection;

        //Convert all of them to entities
        foreach ($result as $row)
        {
            $list->add($this->convertValue($row[0]));
        }

        return $list;
    }
734289
protected function getDocHelper(): DocHelper
    {
        if ($this->docHelper === null) {
            $this->docHelper = new DocHelper($this->getFile()->getBaseFile(), $this->getStackPos());
        }

        return $this->docHelper;
    }