public function beforeSave() { $this->setInputProperties(); $this->setOutputProperties(); $els = $this->getProperty('els', null); if ($els != null) { $this->object->set('elements', $els); } return parent::beforeSave(); }
public function beforeSave() { $isStatic = intval($this->getProperty('static', 0)); if ($isStatic == 1) { $staticFile = $this->getProperty('static_file'); if (empty($staticFile)) { $this->addFieldError('static_file', $this->modx->lexicon('static_file_ns')); } } return parent::beforeSave(); }
public function beforeSave() { $disabled = (bool) $this->getProperty('disabled', false); $this->object->set('disabled', $disabled); $isStatic = intval($this->getProperty('static', 0)); if ($isStatic == 1) { $staticFile = $this->getProperty('static_file'); if (empty($staticFile)) { $this->addFieldError('static_file', $this->modx->lexicon('static_file_ns')); } } return parent::beforeSave(); }
public function beforeSave() { $disabled = (bool) $this->getProperty('disabled', false); $this->object->set('disabled', $disabled); return parent::beforeSave(); }