Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
TableCollection.php
Go to the documentation of this file.
1 <?php
8 
10 
16 {
20  protected $fixture;
21 
32  public function __construct(
33  \Magento\Framework\Data\Collection\EntityFactory $entityFactory,
34  \Psr\Log\LoggerInterface $logger,
35  \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
36  \Magento\Framework\Event\ManagerInterface $eventManager,
37  \Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
38  \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null,
39  array $fixture = []
40  ) {
41  $this->setModel(\Magento\Framework\DataObject::class);
42  $this->setResourceModel(\Magento\Mtf\Util\Generate\Repository\RepositoryResource::class);
43 
44  $resource = $this->getResource();
45  $resource->setFixture($fixture);
46 
47  parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
48  }
49 
55  public function getResource()
56  {
57  return parent::getResource();
58  }
59 }
$resource
Definition: bulk.php:12
$logger
$connection
Definition: bulk.php:13
__construct(\Magento\Framework\Data\Collection\EntityFactory $entityFactory, \Psr\Log\LoggerInterface $logger, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Framework\DB\Adapter\AdapterInterface $connection=null, \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource=null, array $fixture=[])