protected function logAuditEventsListForCreatedAndModifed($newModel) { if ($newModel) { AuditEvent::logAuditEvent('ZurmoModule', ZurmoModule::AUDIT_EVENT_ITEM_CREATED, strval($this), $this); } else { AuditUtil::logAuditEventsListForChangedAttributeValues($this); } }
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); } }
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); } }
protected function logAuditEventsListForModified($newModel) { if (!$newModel) { AuditUtil::logAuditEventsListForChangedAttributeValues($this); } }