示例#1
0
 protected function getChanges()
 {
     $res = false;
     if (!empty($this->_modelSave)) {
         foreach ($this->_modelSave as $key => $value) {
             if ($this->{$key} != $value) {
                 UpdateProfile::addRecord($key, $value, $this->{$key});
                 $res = true;
             }
         }
         if ($res) {
             // можно внести в конфигу
             Yii::import('application.modules.project.components.EventHelper');
             EventHelper::updateProfile();
         }
     }
     return $res;
 }