protected function beforeSave()
 {
     if ($bResult = parent::beforeSave()) {
         $this->setDateUpdate(date("Y-m-d H:i:s"));
     }
     return $bResult;
 }
 protected function beforeSave()
 {
     if ($bResult = parent::beforeSave()) {
         $oValueType = $this->getValueTypeObject();
         $oValueType->beforeSaveValue();
     }
     return $bResult;
 }
 protected function beforeSave()
 {
     if ($bResult = parent::beforeSave()) {
         if ($this->_isNew()) {
             $this->setDateCreate(date("Y-m-d H:i:s"));
             $this->setIp(func_getIp());
         }
     }
     return $bResult;
 }
 /**
  * Выполняется перед сохранением сущности
  *
  * @return bool
  */
 protected function beforeSave()
 {
     if ($bResult = parent::beforeSave()) {
         if ($this->_isNew()) {
             $this->setDateCreate(date("Y-m-d H:i:s"));
             $oValue = Engine::GetEntity('ModuleProperty_EntityValue', array('property_type' => $this->getType(), 'property_id' => $this->getId(), 'target_type' => $this->getTargetType(), 'target_id' => $this->getId()));
             $oValueType = $oValue->getValueTypeObject();
             /**
              * Выставляем дефолтные значения параметров
              */
             $this->setParams($oValueType->getParamsDefault());
             /**
              * Выставляем дефолтные значения параметров валидации
              */
             $this->setValidateRules($oValueType->getValidateRulesDefault());
         }
     }
     return $bResult;
 }