File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
app/code/Magento/Catalog/Model Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,11 @@ class Category extends \Magento\Catalog\Model\AbstractModel implements
7272
7373 const CACHE_TAG = 'cat_c ' ;
7474
75+ /**
76+ * Category Store Id
77+ */
78+ const STORE_ID = 'store_id ' ;
79+
7580 /**#@-*/
7681 protected $ _eventPrefix = 'catalog_category ' ;
7782
@@ -564,12 +569,12 @@ public function getStoreIds()
564569 *
565570 * If store id is underfined for category return current active store id
566571 *
567- * @return integer
572+ * @return int
568573 */
569574 public function getStoreId ()
570575 {
571- if ($ this ->hasData (' store_id ' )) {
572- return (int )$ this ->_getData (' store_id ' );
576+ if ($ this ->hasData (self :: STORE_ID )) {
577+ return (int )$ this ->_getData (self :: STORE_ID );
573578 }
574579 return (int )$ this ->_storeManager ->getStore ()->getId ();
575580 }
@@ -585,7 +590,7 @@ public function setStoreId($storeId)
585590 if (!is_numeric ($ storeId )) {
586591 $ storeId = $ this ->_storeManager ->getStore ($ storeId )->getId ();
587592 }
588- $ this ->setData (' store_id ' , $ storeId );
593+ $ this ->setData (self :: STORE_ID , $ storeId );
589594 $ this ->getResource ()->setStoreId ($ storeId );
590595 return $ this ;
591596 }
Original file line number Diff line number Diff line change @@ -526,9 +526,9 @@ protected function getCustomAttributesCodes()
526526 public function getStoreId ()
527527 {
528528 if ($ this ->hasData (self ::STORE_ID )) {
529- return $ this ->getData (self ::STORE_ID );
529+ return ( int ) $ this ->getData (self ::STORE_ID );
530530 }
531- return $ this ->_storeManager ->getStore ()->getId ();
531+ return ( int ) $ this ->_storeManager ->getStore ()->getId ();
532532 }
533533
534534 /**
You can’t perform that action at this time.
0 commit comments