Пример #1
0
 /**
  * Perform actions after object delete
  *
  * @param \Magento\Framework\Model\AbstractModel $object
  * @return $this
  */
 protected function _afterDelete(\Magento\Framework\Model\AbstractModel $object)
 {
     if ($this->gridAggregator) {
         $this->gridAggregator->purge($object->getId());
     }
     parent::_afterDelete($object);
     return $this;
 }
Пример #2
0
 /**
  * @param \Magento\Framework\App\Resource $resource
  * @param \Magento\Framework\Stdlib\DateTime $dateTime
  */
 public function __construct(\Magento\Framework\App\Resource $resource, \Magento\Framework\Stdlib\DateTime $dateTime)
 {
     parent::__construct($resource, $dateTime);
 }
Пример #3
0
 /**
  * Save object data
  *
  * @param \Magento\Framework\Model\AbstractModel $object
  * @return $this
  */
 public function save(\Magento\Framework\Model\AbstractModel $object)
 {
     if (!$object->getForceObjectSave()) {
         parent::save($object);
     }
     return $this;
 }