public function setStoreId($store) { if ($store instanceof Store) { $store = $store->getId(); } $this->storeId = $store; return $this; }