/**
  * Delete from database
  *
  * @param void
  * @return boolean
  */
 function delete()
 {
     $delete = parent::delete();
     if ($delete && !is_error($delete)) {
         switch ($this->getType()) {
             case COMPANY_CONFIG_OPTION:
                 CompanyConfigOptions::deleteByOption($this->getName());
                 break;
             case USER_CONFIG_OPTION:
                 UserConfigOptions::deleteByOption($this->getName());
                 break;
             case PROJECT_CONFIG_OPTION:
                 ProjectConfigOptions::deleteByOption($this->getName());
                 break;
         }
         // if
     }
     // if
     return $delete;
 }
 /**
  * Set option value
  *
  * @access public
  * @param mixed $value
  * @return boolean
  */
 function setValue($value)
 {
     $handler = $this->getConfigHandler();
     $handler->setValue($value);
     return parent::setValue($handler->getRawValue());
 }
示例#3
0
 function save(){
 	parent::save();
 	ConfigOptions::instance()->updateConfigOptionCache($this);
 }