/** * @return bool */ public function beforeSave() { $this->object->set('published', 1); $properties = $this->object->get('properties'); if (array_key_exists('was_published', $properties)) { unset($properties['was_published']); $this->object->set('properties', $properties); $this->_sendEmails = true; } return parent::beforeSave(); }
/** * @return bool */ public function beforeSave() { $this->object->set('published', 0); return parent::beforeSave(); }