Пример #1
0
 protected function logAuditEventsListForCreatedAndModifed($newModel)
 {
     if ($newModel) {
         AuditEvent::logAuditEvent('ZurmoModule', ZurmoModule::AUDIT_EVENT_ITEM_CREATED, strval($this), $this);
     } else {
         AuditUtil::logAuditEventsListForChangedAttributeValues($this);
     }
 }
Пример #2
0
 protected function logAuditEventsListForCreatedAndModifed($newModel)
 {
     if ($newModel) {
         // When the first user is created there can be no
         // current user. Log the first user as creating themselves.
         if (Yii::app()->user->userModel == null || !Yii::app()->user->userModel->id > 0) {
             Yii::app()->user->userModel = $this;
         }
         AuditEvent::logAuditEvent('ZurmoModule', ZurmoModule::AUDIT_EVENT_ITEM_CREATED, strval($this), $this);
     } else {
         AuditUtil::logAuditEventsListForChangedAttributeValues($this);
     }
 }
Пример #3
0
 protected function logAuditEventsListForModified($newModel)
 {
     if ($newModel) {
         // When the first user is created there can be no
         // current user. Log the first user as creating themselves.
         if (Yii::app()->user->userModel == null || !Yii::app()->user->userModel->id > 0) {
             Yii::app()->user->userModel = $this;
         }
     } else {
         AuditUtil::logAuditEventsListForChangedAttributeValues($this);
     }
 }
Пример #4
0
 protected function logAuditEventsListForModified($newModel)
 {
     if (!$newModel) {
         AuditUtil::logAuditEventsListForChangedAttributeValues($this);
     }
 }