/** * Return name of table for given $storeId. * * @param integer $storeId * @return string */ public function getMainStoreTable($storeId = 0) { $table = parent::getMainTable(); if (is_string($storeId)) { $storeId = intval($storeId); } if ($this->getUseStoreTables() && $storeId) { $table .= '_store_' . $storeId; } return $table; }