src/Charcoal/Admin/Service/Exporter.php
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;
    }
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;
    }
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 ; }
Actual object collection
@throws Exception If collection config is not set.
@return Collection Collection from the export config.
Actual object collection