Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Code.php
Go to the documentation of this file.
1 <?php
7 
23 {
27  const ENTITY_TYPE_PRODUCT = 'product';
28 
29  const ENTITY_TYPE_CATEGORY = 'category';
30 
31  const ENTITY_TYPE_PAGE = 'cms';
32 
36  protected $_validateEntryFlag = false;
37 
42  protected function _construct()
43  {
44  parent::_construct();
45  $this->_init(\Magento\GoogleOptimizer\Model\ResourceModel\Code::class);
46  }
47 
56  public function loadByEntityIdAndType($entityId, $entityType, $storeId = 0)
57  {
58  $this->getResource()->loadByEntityType($this, $entityId, $entityType, $storeId);
59  $this->_afterLoad();
60  return $this;
61  }
62 }
loadByEntityIdAndType($entityId, $entityType, $storeId=0)
Definition: Code.php:56