Example #1
0
 /**
  * Unset array element with '__empty' key
  *
  * @return void
  */
 protected function _beforeSave()
 {
     $value = $this->getValue();
     if (is_array($value)) {
         unset($value['__empty']);
     }
     $this->setValue($value);
     parent::_beforeSave();
 }
Example #2
0
 /**
  * Unset array element with '__empty' key
  *
  * @return void
  */
 public function beforeSave()
 {
     $value = $this->getValue();
     if (is_array($value)) {
         unset($value['__empty']);
     }
     $this->setValue($value);
     parent::beforeSave();
 }