예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function save(\Magento\Framework\Model\AbstractModel $object)
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'save');
     if (!$pluginInfo) {
         return parent::save($object);
     } else {
         return $this->___callPlugins('save', func_get_args(), $pluginInfo);
     }
 }
예제 #2
0
 /**
  * Retrieve attribute by code
  *
  * @param string $attrCode
  * @return mixed
  */
 public function retrieveAttributeByCode($attrCode)
 {
     if (!$this->_resource) {
         $this->_resource = $this->_resourceFactory->create();
     }
     if (!isset($this->_attributeCache[$attrCode])) {
         $this->_attributeCache[$attrCode] = $this->_resource->getAttribute($attrCode);
     }
     return $this->_attributeCache[$attrCode];
 }
예제 #3
0
 /**
  * {@inheritdoc}
  */
 public function getValidationRulesBeforeSave()
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getValidationRulesBeforeSave');
     if (!$pluginInfo) {
         return parent::getValidationRulesBeforeSave();
     } else {
         return $this->___callPlugins('getValidationRulesBeforeSave', func_get_args(), $pluginInfo);
     }
 }