/** * Retrieve rule actions model * * @return \Magento\Rule\Model\Action\Collection */ public function getActions() { if (!$this->_actions) { $this->_resetActions(); } // Load rule actions if it is applicable if ($this->hasActionsSerialized()) { $actions = $this->getActionsSerialized(); if (!empty($actions)) { $actions = unserialize($actions); if (is_array($actions) && !empty($actions)) { $this->_actions->loadArray($actions); } } $this->unsActionsSerialized(); } return $this->_actions; }
/** * @return array */ public function getNewChildSelectOptions() { $actions = parent::getNewChildSelectOptions(); $actions = array_merge_recursive($actions, [['value' => 'Magento\\CatalogRule\\Model\\Rule\\Action\\Product', 'label' => __('Update the Product')]]); return $actions; }