resource = $resource; } /** * @param int $websiteId * @return array */ public function getStoreByWebsiteId($websiteId) { $connection = $this->resource->getConnection(); $storeTable = $this->resource->getTableName('store'); $storeSelect = $connection->select()->from($storeTable, ['store_id'])->where( 'website_id = ?', $websiteId ); $data = $connection->fetchCol($storeSelect); return $data; } }