Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
StoreWebsiteRelation.php
Go to the documentation of this file.
1 <?php
7 
9 
14 {
18  private $resource;
19 
24  public function __construct(ResourceConnection $resource)
25  {
26  $this->resource = $resource;
27  }
28 
34  {
35  $connection = $this->resource->getConnection();
36  $storeTable = $this->resource->getTableName('store');
37  $storeSelect = $connection->select()->from($storeTable, ['store_id'])->where(
38  'website_id = ?',
40  );
41  $data = $connection->fetchCol($storeSelect);
42  return $data;
43  }
44 }
$resource
Definition: bulk.php:12
$connection
Definition: bulk.php:13