Ejemplo n.º 1
0
 /**
  * Creates a log item
  * @param Enums\ObjectType $objType The type of object being manipulated
  * @param Enums\Action $action The operation executed on the object
  * @return LogItem Returns a log item, freshly saved to the database
  */
 private function CreateLogItem(Enums\ObjectType $objType, Enums\Action $action)
 {
     $this->DeleteOldLogItems();
     $item = new LogItem();
     $item->SetChanged(Date::Now());
     $item->SetAction((string) $action);
     $item->SetObjectType((string) $objType);
     $item->SetUser($this->user);
     $item->Save();
     return $item;
 }