From e6b6be2624553014765b357ccd8feab2d1fc3a13 Mon Sep 17 00:00:00 2001 From: Guillaume Lajarige Date: Tue, 3 Oct 2017 08:19:05 +0000 Subject: [PATCH] =?UTF-8?q?N=C2=B01034=20New=20EventOnObject=20class=20to?= =?UTF-8?q?=20store=20explaination=20on=20object's=20updates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SVN:trunk[4955] --- core/event.class.inc.php | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/core/event.class.inc.php b/core/event.class.inc.php index 52b1bca89..cc126b3f2 100644 --- a/core/event.class.inc.php +++ b/core/event.class.inc.php @@ -1,5 +1,5 @@ +class EventOnObject extends Event +{ + public static function Init() + { + $aParams = array + ( + "category" => "core/cmdb,view_in_gui", + "key_type" => "autoincrement", + "name_attcode" => "", + "state_attcode" => "", + "reconc_keys" => array(), + "db_table" => "priv_event_onobject", + "db_key_field" => "id", + "db_finalclass_field" => "", + "display_template" => "", + "order_by_default" => array('date' => false) + ); + MetaModel::Init_Params($aParams); + MetaModel::Init_InheritAttributes(); + MetaModel::Init_AddAttribute(new AttributeString("obj_class", array("allowed_values"=>null, "sql"=>"obj_class", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeInteger("obj_key", array("allowed_values"=>null, "sql"=>"obj_key", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array()))); + + // Display lists + MetaModel::Init_SetZListItems('details', array('date', 'userinfo', 'obj_class', 'obj_key', 'message')); // Attributes to be displayed for the complete details + MetaModel::Init_SetZListItems('list', array('date', 'userinfo', 'obj_class', 'obj_key', 'message')); // Attributes to be displayed for a list + } +}