Exemplo n.º 1
0
 public function beforeSave()
 {
     $this->setInputProperties();
     $this->setOutputProperties();
     $els = $this->getProperty('els', null);
     if ($els != null) {
         $this->object->set('elements', $els);
     }
     return parent::beforeSave();
 }
Exemplo n.º 2
0
 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();
 }
Exemplo n.º 3
0
 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();
 }
Exemplo n.º 4
0
 public function beforeSave()
 {
     $disabled = (bool) $this->getProperty('disabled', false);
     $this->object->set('disabled', $disabled);
     return parent::beforeSave();
 }