当前位置: 首页>>代码示例>>PHP>>正文


PHP MetaModel::Init_InheritAttributes方法代码示例

本文整理汇总了PHP中MetaModel::Init_InheritAttributes方法的典型用法代码示例。如果您正苦于以下问题:PHP MetaModel::Init_InheritAttributes方法的具体用法?PHP MetaModel::Init_InheritAttributes怎么用?PHP MetaModel::Init_InheritAttributes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MetaModel的用法示例。


在下文中一共展示了MetaModel::Init_InheritAttributes方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Init

 public static function Init()
 {
     $aParams = array('category' => 'bizmodel,configmgmt', 'key_type' => 'autoincrement', 'is_link' => true, 'name_attcode' => 'volume_id', 'state_attcode' => '', 'reconc_keys' => array(''), 'db_table' => 'lnkvirtualdevicetovolume', 'db_key_field' => 'id', 'db_finalclass_field' => '');
     MetaModel::Init_Params($aParams);
     MetaModel::Init_InheritAttributes();
     MetaModel::Init_AddAttribute(new AttributeExternalKey("volume_id", array("targetclass" => 'LogicalVolume', "allowed_values" => null, "sql" => 'volume_id', "is_null_allowed" => false, "on_target_delete" => DEL_AUTO, "depends_on" => array(), "display_style" => 'select', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalField("volume_name", array("allowed_values" => null, "extkey_attcode" => 'volume_id', "target_attcode" => 'name', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalKey("virtualdevice_id", array("targetclass" => 'VirtualDevice', "allowed_values" => null, "sql" => 'virtualdevice_id', "is_null_allowed" => false, "on_target_delete" => DEL_AUTO, "depends_on" => array(), "display_style" => 'select', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalField("virtualdevice_name", array("allowed_values" => null, "extkey_attcode" => 'virtualdevice_id', "target_attcode" => 'name', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeString("size_used", array("allowed_values" => null, "sql" => 'size_used', "default_value" => '', "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_SetZListItems('details', array(0 => 'volume_id', 1 => 'virtualdevice_id', 2 => 'size_used'));
     MetaModel::Init_SetZListItems('standard_search', array(0 => 'volume_id', 1 => 'virtualdevice_id'));
     MetaModel::Init_SetZListItems('list', array(0 => 'volume_id', 1 => 'virtualdevice_id', 2 => 'size_used'));
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:14,代码来源:model.itop-bridge-virtualization-storage.php

示例2: Init

 public static function Init()
 {
     $aParams = array('category' => 'addon,bizmodel', 'key_type' => 'autoincrement', 'name_attcode' => array('item_class', 'temp_id'), 'state_attcode' => '', 'reconc_keys' => array(''), 'db_table' => 'attachment', 'db_key_field' => 'id', 'db_finalclass_field' => '', 'indexes' => array(1 => array(0 => 'temp_id'), 2 => array(0 => 'item_class', 1 => 'item_id'), 3 => array(0 => 'item_org_id')));
     MetaModel::Init_Params($aParams);
     MetaModel::Init_InheritAttributes();
     MetaModel::Init_AddAttribute(new AttributeDateTime("expire", array("allowed_values" => null, "sql" => 'expire', "default_value" => '', "is_null_allowed" => false, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeString("temp_id", array("allowed_values" => null, "sql" => 'temp_id', "default_value" => '', "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeString("item_class", array("allowed_values" => null, "sql" => 'item_class', "default_value" => '', "is_null_allowed" => false, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeObjectKey("item_id", array("class_attcode" => 'item_class', "allowed_values" => null, "sql" => 'item_id', "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeInteger("item_org_id", array("allowed_values" => null, "sql" => 'item_org_id', "default_value" => '0', "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeBlob("contents", array("is_null_allowed" => false, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_SetZListItems('details', array(0 => 'temp_id', 1 => 'item_class', 2 => 'item_id', 3 => 'item_org_id'));
     MetaModel::Init_SetZListItems('standard_search', array(0 => 'temp_id', 1 => 'item_class', 2 => 'item_id'));
     MetaModel::Init_SetZListItems('list', array(0 => 'temp_id', 1 => 'item_class', 2 => 'item_id'));
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:15,代码来源:model.itop-attachments.php

示例3: Init

 public static function Init()
 {
     $aParams = array('category' => 'application', 'key_type' => 'autoincrement', 'name_attcode' => array('obj_class', 'obj_key'), 'state_attcode' => '', 'reconc_keys' => array(''), 'db_table' => 'priv_ownership_token', 'db_key_field' => 'id', 'db_finalclass_field' => '');
     MetaModel::Init_Params($aParams);
     MetaModel::Init_InheritAttributes();
     MetaModel::Init_AddAttribute(new AttributeDateTime("acquired", array("allowed_values" => null, "sql" => 'acquired', "default_value" => '', "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeDateTime("last_seen", array("allowed_values" => null, "sql" => 'last_seen', "default_value" => '', "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeString("obj_class", array("allowed_values" => null, "sql" => 'obj_class', "default_value" => '', "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeInteger("obj_key", array("allowed_values" => null, "sql" => 'obj_key', "default_value" => '', "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeString("token", array("allowed_values" => null, "sql" => 'token', "default_value" => '', "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeExternalKey("user_id", array("targetclass" => "User", "jointype" => '', "allowed_values" => null, "sql" => "user_id", "is_null_allowed" => true, "on_target_delete" => DEL_SILENT, "depends_on" => array())));
     MetaModel::Init_SetZListItems('details', array('obj_class', 'obj_key', 'last_seen', 'token'));
     MetaModel::Init_SetZListItems('standard_search', array('obj_class', 'obj_key', 'last_seen', 'token'));
     MetaModel::Init_SetZListItems('list', array('obj_class', 'obj_key', 'last_seen', 'token'));
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:15,代码来源:ownershiplock.class.inc.php

示例4: Init

 public static function Init()
 {
     $aParams = array("category" => "addon/authentication", "key_type" => "autoincrement", "name_attcode" => "login", "state_attcode" => "", "reconc_keys" => array('login'), "db_table" => "", "db_key_field" => "id", "db_finalclass_field" => "", "display_template" => "");
     MetaModel::Init_Params($aParams);
     MetaModel::Init_InheritAttributes();
     // Display lists
     MetaModel::Init_SetZListItems('details', array('contactid', 'first_name', 'email', 'login', 'language', 'profile_list', 'allowed_org_list'));
     // Attributes to be displayed for the complete details
     MetaModel::Init_SetZListItems('list', array('first_name', 'last_name', 'login'));
     // Attributes to be displayed for a list
     // Search criteria
     MetaModel::Init_SetZListItems('standard_search', array('login', 'contactid'));
     // Criteria of the std search form
     MetaModel::Init_SetZListItems('advanced_search', array('login', 'contactid'));
     // Criteria of the advanced search form
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:16,代码来源:model.authent-ldap.php

示例5: Init

 public static function Init()
 {
     $aParams = array("category" => "core/cmdb,view_in_gui,application", "key_type" => "autoincrement", "name_attcode" => "name", "state_attcode" => "", "reconc_keys" => array(), "db_table" => "priv_query_oql", "db_key_field" => "id", "db_finalclass_field" => "", "display_template" => "");
     MetaModel::Init_Params($aParams);
     MetaModel::Init_InheritAttributes();
     MetaModel::Init_AddAttribute(new AttributeOQL("oql", array("allowed_values" => null, "sql" => "oql", "default_value" => null, "is_null_allowed" => false, "depends_on" => array())));
     // Display lists
     MetaModel::Init_SetZListItems('details', array('name', 'description', 'oql', 'fields'));
     // Attributes to be displayed for the complete details
     MetaModel::Init_SetZListItems('list', array('description'));
     // Attributes to be displayed for a list
     // Search criteria
     MetaModel::Init_SetZListItems('standard_search', array('name', 'description', 'fields', 'oql'));
     // Criteria of the std search form
     //		MetaModel::Init_SetZListItems('advanced_search', array('name')); // Criteria of the advanced search form
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:16,代码来源:query.class.inc.php

示例6: Init

 public static function Init()
 {
     $aParams = array('category' => 'bizmodel,searchable,changemgmt', 'key_type' => 'autoincrement', 'name_attcode' => 'ref', 'state_attcode' => 'status', 'reconc_keys' => array('ref'), 'db_table' => 'ticket_change', 'db_key_field' => 'id', 'db_finalclass_field' => '', 'icon' => utils::GetAbsoluteUrlModulesRoot() . 'itop-change-mgmt/images/change.png', 'order_by_default' => array('ref' => false));
     MetaModel::Init_Params($aParams);
     MetaModel::Init_InheritAttributes();
     MetaModel::Init_AddAttribute(new AttributeEnum("status", array("allowed_values" => new ValueSetEnum("new,assigned,planned,approved,closed,rejected"), "display_style" => 'list', "sql" => 'status', "default_value" => 'new', "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeEnum("category", array("allowed_values" => new ValueSetEnum("hardware,software,system,network,application,other"), "display_style" => 'list', "sql" => 'category', "default_value" => 'hardware', "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeText("reject_reason", array("allowed_values" => null, "sql" => 'reject_reason', "default_value" => '', "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalKey("changemanager_id", array("targetclass" => 'Person', "allowed_values" => null, "sql" => 'changemanager_id', "is_null_allowed" => true, "on_target_delete" => DEL_MANUAL, "depends_on" => array(), "display_style" => 'select', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalField("changemanager_email", array("allowed_values" => null, "extkey_attcode" => 'changemanager_id', "target_attcode" => 'email', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalKey("parent_id", array("targetclass" => 'Change', "allowed_values" => new ValueSetObjects("SELECT Change WHERE id != :this->id"), "sql" => 'parent_id', "is_null_allowed" => true, "on_target_delete" => DEL_MANUAL, "depends_on" => array(), "display_style" => 'select', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalField("parent_name", array("allowed_values" => null, "extkey_attcode" => 'parent_id', "target_attcode" => 'ref', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeDateTime("creation_date", array("allowed_values" => null, "sql" => 'creation_date', "default_value" => '', "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeDateTime("approval_date", array("allowed_values" => null, "sql" => 'approval_date', "default_value" => '', "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeText("fallback_plan", array("allowed_values" => null, "sql" => 'fallback_plan', "default_value" => '', "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeEnum("outage", array("allowed_values" => new ValueSetEnum("yes,no"), "display_style" => 'list', "sql" => 'outage', "default_value" => 'no', "is_null_allowed" => false, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeLinkedSet("related_request_list", array("linked_class" => 'UserRequest', "ext_key_to_me" => 'parent_change_id', "count_min" => 0, "count_max" => 0, "edit_mode" => LINKSET_EDITMODE_ADDREMOVE, "allowed_values" => null, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeLinkedSet("related_incident_list", array("linked_class" => 'Incident', "ext_key_to_me" => 'parent_change_id', "count_min" => 0, "count_max" => 0, "edit_mode" => LINKSET_EDITMODE_ADDREMOVE, "allowed_values" => null, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeLinkedSet("related_problems_list", array("linked_class" => 'Problem', "ext_key_to_me" => 'related_change_id', "count_min" => 0, "count_max" => 0, "edit_mode" => LINKSET_EDITMODE_ADDREMOVE, "allowed_values" => null, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeLinkedSet("child_changes_list", array("linked_class" => 'Change', "ext_key_to_me" => 'parent_id', "count_min" => 0, "count_max" => 0, "edit_mode" => LINKSET_EDITMODE_ADDREMOVE, "allowed_values" => new ValueSetObjects("SELECT Change WHERE id != :this->id"), "depends_on" => array(), "always_load_in_tables" => false)));
     // Lifecycle (status attribute: status)
     //
     MetaModel::Init_DefineStimulus(new StimulusUserAction("ev_assign", array()));
     MetaModel::Init_DefineStimulus(new StimulusUserAction("ev_plan", array()));
     MetaModel::Init_DefineStimulus(new StimulusUserAction("ev_reject", array()));
     MetaModel::Init_DefineStimulus(new StimulusUserAction("ev_reopen", array()));
     MetaModel::Init_DefineStimulus(new StimulusUserAction("ev_approve", array()));
     MetaModel::Init_DefineStimulus(new StimulusUserAction("ev_finish", array()));
     MetaModel::Init_DefineState("new", array("attribute_inherit" => '', "attribute_list" => array('ref' => OPT_ATT_READONLY, 'org_id' => OPT_ATT_MANDATORY, 'title' => OPT_ATT_MANDATORY, 'description' => OPT_ATT_MANDATORY, 'last_update' => OPT_ATT_READONLY, 'close_date' => OPT_ATT_HIDDEN, 'reject_reason' => OPT_ATT_HIDDEN, 'creation_date' => OPT_ATT_READONLY, 'approval_date' => OPT_ATT_HIDDEN, 'caller_id' => OPT_ATT_MANDATORY, 'team_id' => OPT_ATT_HIDDEN, 'agent_id' => OPT_ATT_HIDDEN, 'changemanager_id' => OPT_ATT_HIDDEN, 'outage' => OPT_ATT_HIDDEN)));
     MetaModel::Init_DefineTransition("new", "ev_assign", array("target_state" => "assigned", "actions" => array(), "user_restriction" => null));
     MetaModel::Init_DefineState("assigned", array("attribute_inherit" => 'new', "attribute_list" => array('team_id' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'agent_id' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'changemanager_id' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'caller_id' => OPT_ATT_NORMAL)));
     MetaModel::Init_DefineTransition("assigned", "ev_plan", array("target_state" => "planned", "actions" => array(), "user_restriction" => null));
     MetaModel::Init_DefineState("planned", array("attribute_inherit" => 'assigned', "attribute_list" => array('start_date' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'end_date' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'fallback_plan' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'caller_id' => OPT_ATT_MANDATORY, 'outage' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT)));
     MetaModel::Init_DefineTransition("planned", "ev_reject", array("target_state" => "rejected", "actions" => array(), "user_restriction" => null));
     MetaModel::Init_DefineTransition("planned", "ev_approve", array("target_state" => "approved", "actions" => array(array('verb' => 'SetCurrentDate', 'params' => array(array('type' => 'attcode', 'value' => "approval_date"))), array('verb' => 'Reset', 'params' => array(array('type' => 'attcode', 'value' => "reject_reason")))), "user_restriction" => null));
     MetaModel::Init_DefineState("rejected", array("attribute_inherit" => 'assigned', 'highlight' => array('code' => 'rejected'), "attribute_list" => array('start_date' => OPT_ATT_READONLY, 'end_date' => OPT_ATT_READONLY, 'private_log' => OPT_ATT_READONLY, 'caller_id' => OPT_ATT_READONLY, 'fallback_plan' => OPT_ATT_READONLY, 'category' => OPT_ATT_READONLY, 'parent_id' => OPT_ATT_READONLY, 'org_id' => OPT_ATT_READONLY, 'title' => OPT_ATT_READONLY, 'description' => OPT_ATT_READONLY, 'reject_reason' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'approval_date' => OPT_ATT_READONLY, 'team_id' => OPT_ATT_READONLY, 'agent_id' => OPT_ATT_READONLY, 'changemanager_id' => OPT_ATT_READONLY, 'outage' => OPT_ATT_READONLY)));
     MetaModel::Init_DefineTransition("rejected", "ev_reopen", array("target_state" => "assigned", "actions" => array(), "user_restriction" => null));
     MetaModel::Init_DefineState("approved", array("attribute_inherit" => 'planned', 'highlight' => array('code' => 'approved'), "attribute_list" => array('private_log' => OPT_ATT_NORMAL, 'category' => OPT_ATT_NORMAL, 'parent_id' => OPT_ATT_NORMAL, 'org_id' => OPT_ATT_READONLY, 'title' => OPT_ATT_READONLY, 'description' => OPT_ATT_READONLY, 'start_date' => OPT_ATT_READONLY, 'end_date' => OPT_ATT_READONLY, 'reject_reason' => OPT_ATT_READONLY, 'creation_date' => OPT_ATT_HIDDEN, 'approval_date' => OPT_ATT_READONLY, 'caller_id' => OPT_ATT_READONLY, 'team_id' => OPT_ATT_READONLY, 'agent_id' => OPT_ATT_READONLY, 'changemanager_id' => OPT_ATT_READONLY, 'fallback_plan' => OPT_ATT_NORMAL, 'outage' => OPT_ATT_READONLY)));
     MetaModel::Init_DefineTransition("approved", "ev_finish", array("target_state" => "closed", "actions" => array(array('verb' => 'SetCurrentDate', 'params' => array(array('type' => 'attcode', 'value' => "close_date")))), "user_restriction" => null));
     MetaModel::Init_DefineState("closed", array("attribute_inherit" => 'approved', 'highlight' => array('code' => 'closed'), "attribute_list" => array('close_date' => OPT_ATT_READONLY, 'creation_date' => OPT_ATT_READONLY, 'private_log' => OPT_ATT_READONLY, 'fallback_plan' => OPT_ATT_READONLY, 'category' => OPT_ATT_READONLY, 'parent_id' => OPT_ATT_READONLY)));
     // Higlight Scale
     MetaModel::Init_DefineHighlightScale(array('approved' => array('rank' => 1, 'color' => HILIGHT_CLASS_NONE, 'icon' => utils::GetAbsoluteUrlModulesRoot() . 'itop-change-mgmt/images/change-approved.png'), 'rejected' => array('rank' => 2, 'color' => HILIGHT_CLASS_NONE, 'icon' => utils::GetAbsoluteUrlModulesRoot() . 'itop-change-mgmt/images/change-rejected.png'), 'closed' => array('rank' => 3, 'color' => HILIGHT_CLASS_NONE, 'icon' => utils::GetAbsoluteUrlModulesRoot() . 'itop-change-mgmt/images/change-closed.png')));
     MetaModel::Init_SetZListItems('details', array(0 => 'functionalcis_list', 1 => 'contacts_list', 2 => 'workorders_list', 3 => 'related_request_list', 4 => 'related_incident_list', 5 => 'related_problems_list', 6 => 'child_changes_list', 'col:col1' => array('fieldset:Ticket:baseinfo' => array(0 => 'ref', 1 => 'org_id', 2 => 'status', 3 => 'title', 4 => 'description'), 'fieldset:Ticket:contact' => array(0 => 'caller_id', 1 => 'team_id', 2 => 'agent_id', 3 => 'changemanager_id')), 'col:col2' => array('fieldset:Ticket:resolution' => array(0 => 'category', 1 => 'outage', 2 => 'reject_reason', 3 => 'fallback_plan'), 'fieldset:Ticket:relation' => array(0 => 'parent_id')), 'col:col3' => array('fieldset:Ticket:date' => array(0 => 'creation_date', 1 => 'start_date', 2 => 'end_date', 3 => 'last_update', 4 => 'approval_date', 5 => 'close_date'))));
     MetaModel::Init_SetZListItems('standard_search', array(0 => 'ref', 1 => 'title', 2 => 'org_id', 3 => 'status', 4 => 'start_date', 5 => 'end_date', 6 => 'creation_date', 7 => 'last_update', 8 => 'close_date', 9 => 'team_id', 10 => 'agent_id', 11 => 'changemanager_id'));
     MetaModel::Init_SetZListItems('list', array(0 => 'title', 1 => 'org_id', 2 => 'start_date', 3 => 'end_date', 4 => 'status', 5 => 'category', 6 => 'agent_id'));
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:46,代码来源:model.itop-change-mgmt.php

示例7: Init

 public static function Init()
 {
     $aParams = array("category" => "addon/authentication", "key_type" => "autoincrement", "name_attcode" => "login", "state_attcode" => "", "reconc_keys" => array('login'), "db_table" => "priv_user_local", "db_key_field" => "id", "db_finalclass_field" => "", "display_template" => "");
     MetaModel::Init_Params($aParams);
     MetaModel::Init_InheritAttributes();
     MetaModel::Init_AddAttribute(new AttributeOneWayPassword("password", array("allowed_values" => null, "sql" => "pwd", "default_value" => null, "is_null_allowed" => false, "depends_on" => array())));
     // Display lists
     MetaModel::Init_SetZListItems('details', array('contactid', 'first_name', 'email', 'login', 'password', 'language', 'profile_list', 'allowed_org_list'));
     // Attributes to be displayed for the complete details
     MetaModel::Init_SetZListItems('list', array('first_name', 'last_name', 'login'));
     // Attributes to be displayed for a list
     // Search criteria
     MetaModel::Init_SetZListItems('standard_search', array('login', 'contactid'));
     // Criteria of the std search form
     MetaModel::Init_SetZListItems('advanced_search', array('login', 'contactid'));
     // Criteria of the advanced search form
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:17,代码来源:model.authent-local.php

示例8: Init

 public static function Init()
 {
     $aParams = array('category' => 'bizmodel,searchable,problemmgmt', 'key_type' => 'autoincrement', 'name_attcode' => 'ref', 'state_attcode' => 'status', 'reconc_keys' => array('ref'), 'db_table' => 'ticket_problem', 'db_key_field' => 'id', 'db_finalclass_field' => '', 'icon' => utils::GetAbsoluteUrlModulesRoot() . 'itop-problem-mgmt/images/problem.png', 'order_by_default' => array('ref' => false));
     MetaModel::Init_Params($aParams);
     MetaModel::Init_InheritAttributes();
     MetaModel::Init_AddAttribute(new AttributeEnum("status", array("allowed_values" => new ValueSetEnum("new,assigned,resolved,closed"), "display_style" => 'list', "sql" => 'status', "default_value" => 'new', "is_null_allowed" => false, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalKey("service_id", array("targetclass" => 'Service', "allowed_values" => new ValueSetObjects("SELECT Service"), "sql" => 'service_id', "is_null_allowed" => true, "on_target_delete" => DEL_MANUAL, "depends_on" => array('org_id'), "allow_target_creation" => false, "display_style" => 'select', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalField("service_name", array("allowed_values" => null, "extkey_attcode" => 'service_id', "target_attcode" => 'name', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalKey("servicesubcategory_id", array("targetclass" => 'ServiceSubcategory', "allowed_values" => new ValueSetObjects("SELECT ServiceSubcategory WHERE service_id = :this->service_id"), "sql" => 'servicesubcategory_id', "is_null_allowed" => true, "on_target_delete" => DEL_MANUAL, "depends_on" => array('service_id'), "allow_target_creation" => false, "display_style" => 'select', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalField("servicesubcategory_name", array("allowed_values" => null, "extkey_attcode" => 'servicesubcategory_id', "target_attcode" => 'name', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeString("product", array("allowed_values" => null, "sql" => 'product', "default_value" => '', "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeEnum("impact", array("allowed_values" => new ValueSetEnum("1,2,3"), "display_style" => 'list', "sql" => 'impact', "default_value" => '1', "is_null_allowed" => false, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeEnum("urgency", array("allowed_values" => new ValueSetEnum("1,2,3,4"), "display_style" => 'list', "sql" => 'urgency', "default_value" => '1', "is_null_allowed" => false, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeEnum("priority", array("allowed_values" => new ValueSetEnum("1,2,3,4"), "display_style" => 'list', "sql" => 'priority', "default_value" => '1', "is_null_allowed" => false, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalKey("related_change_id", array("targetclass" => 'Change', "allowed_values" => new ValueSetObjects("SELECT Change WHERE status != \"closed\""), "sql" => 'related_change_id', "is_null_allowed" => true, "on_target_delete" => DEL_MANUAL, "depends_on" => array(), "display_style" => 'select', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalField("related_change_ref", array("allowed_values" => null, "extkey_attcode" => 'related_change_id', "target_attcode" => 'ref', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeDateTime("assignment_date", array("allowed_values" => null, "sql" => 'assignment_date', "default_value" => '', "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeDateTime("resolution_date", array("allowed_values" => null, "sql" => 'resolution_date', "default_value" => '', "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeLinkedSet("knownerrors_list", array("linked_class" => 'KnownError', "ext_key_to_me" => 'problem_id', "count_min" => 0, "count_max" => 0, "edit_mode" => LINKSET_EDITMODE_ADDONLY, "allowed_values" => null, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeLinkedSet("related_request_list", array("linked_class" => 'UserRequest', "ext_key_to_me" => 'parent_problem_id', "count_min" => 0, "count_max" => 0, "edit_mode" => LINKSET_EDITMODE_ADDREMOVE, "allowed_values" => null, "depends_on" => array(), "always_load_in_tables" => false)));
     // Lifecycle (status attribute: status)
     //
     MetaModel::Init_DefineStimulus(new StimulusUserAction("ev_assign", array()));
     MetaModel::Init_DefineStimulus(new StimulusUserAction("ev_reassign", array()));
     MetaModel::Init_DefineStimulus(new StimulusUserAction("ev_resolve", array()));
     MetaModel::Init_DefineStimulus(new StimulusUserAction("ev_close", array()));
     MetaModel::Init_DefineState("new", array("attribute_inherit" => '', "attribute_list" => array('ref' => OPT_ATT_READONLY, 'org_id' => OPT_ATT_MUSTCHANGE, 'team_id' => OPT_ATT_HIDDEN, 'agent_id' => OPT_ATT_HIDDEN, 'description' => OPT_ATT_MUSTCHANGE, 'start_date' => OPT_ATT_READONLY, 'last_update' => OPT_ATT_READONLY, 'close_date' => OPT_ATT_HIDDEN, 'impact' => OPT_ATT_MUSTCHANGE, 'urgency' => OPT_ATT_MUSTCHANGE, 'priority' => OPT_ATT_READONLY, 'assignment_date' => OPT_ATT_HIDDEN, 'resolution_date' => OPT_ATT_HIDDEN)));
     MetaModel::Init_DefineTransition("new", "ev_assign", array("target_state" => "assigned", "actions" => array('SetAssignedDate'), "user_restriction" => null));
     MetaModel::Init_DefineState("assigned", array("attribute_inherit" => '', "attribute_list" => array('ref' => OPT_ATT_READONLY, 'team_id' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'agent_id' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'start_date' => OPT_ATT_READONLY, 'last_update' => OPT_ATT_READONLY, 'close_date' => OPT_ATT_HIDDEN, 'priority' => OPT_ATT_READONLY, 'assignment_date' => OPT_ATT_READONLY, 'resolution_date' => OPT_ATT_HIDDEN)));
     MetaModel::Init_DefineTransition("assigned", "ev_reassign", array("target_state" => "assigned", "actions" => array(), "user_restriction" => null));
     MetaModel::Init_DefineTransition("assigned", "ev_resolve", array("target_state" => "resolved", "actions" => array('SetResolveDate'), "user_restriction" => null));
     MetaModel::Init_DefineState("resolved", array("attribute_inherit" => '', "attribute_list" => array('ref' => OPT_ATT_READONLY, 'org_id' => OPT_ATT_READONLY, 'team_id' => OPT_ATT_READONLY, 'agent_id' => OPT_ATT_READONLY, 'caller_id' => OPT_ATT_READONLY, 'title' => OPT_ATT_READONLY, 'description' => OPT_ATT_READONLY, 'start_date' => OPT_ATT_READONLY, 'last_update' => OPT_ATT_READONLY, 'close_date' => OPT_ATT_HIDDEN, 'service_id' => OPT_ATT_MANDATORY, 'servicesubcategory_id' => OPT_ATT_MUSTPROMPT, 'product' => OPT_ATT_MUSTPROMPT, 'impact' => OPT_ATT_READONLY, 'urgency' => OPT_ATT_READONLY, 'priority' => OPT_ATT_READONLY, 'assignment_date' => OPT_ATT_READONLY, 'resolution_date' => OPT_ATT_HIDDEN)));
     MetaModel::Init_DefineTransition("resolved", "ev_reassign", array("target_state" => "assigned", "actions" => array(), "user_restriction" => null));
     MetaModel::Init_DefineTransition("resolved", "ev_close", array("target_state" => "closed", "actions" => array('SetClosureDate'), "user_restriction" => null));
     MetaModel::Init_DefineState("closed", array("attribute_inherit" => '', "attribute_list" => array('ref' => OPT_ATT_READONLY, 'org_id' => OPT_ATT_READONLY, 'team_id' => OPT_ATT_READONLY, 'agent_id' => OPT_ATT_READONLY, 'caller_id' => OPT_ATT_READONLY, 'title' => OPT_ATT_READONLY, 'description' => OPT_ATT_READONLY, 'start_date' => OPT_ATT_READONLY, 'last_update' => OPT_ATT_READONLY, 'close_date' => OPT_ATT_READONLY, 'private_log' => OPT_ATT_READONLY, 'service_id' => OPT_ATT_READONLY, 'servicesubcategory_id' => OPT_ATT_READONLY, 'product' => OPT_ATT_READONLY, 'impact' => OPT_ATT_READONLY, 'urgency' => OPT_ATT_READONLY, 'priority' => OPT_ATT_READONLY, 'assignment_date' => OPT_ATT_READONLY, 'resolution_date' => OPT_ATT_HIDDEN, 'related_change_id' => OPT_ATT_READONLY)));
     MetaModel::Init_SetZListItems('details', array(0 => 'functionalcis_list', 1 => 'contacts_list', 2 => 'knownerrors_list', 3 => 'workorders_list', 4 => 'related_request_list', 'col:col1' => array('fieldset:Ticket:baseinfo' => array(0 => 'ref', 1 => 'title', 2 => 'org_id', 3 => 'status', 4 => 'priority', 5 => 'service_id', 6 => 'servicesubcategory_id', 7 => 'product'), 'fieldset:Ticket:moreinfo' => array(0 => 'impact', 1 => 'urgency', 2 => 'description')), 'col:col2' => array('fieldset:Ticket:date' => array(0 => 'start_date', 1 => 'last_update', 2 => 'assignment_date', 3 => 'resolution_date', 4 => 'close_date'), 'fieldset:Ticket:contact' => array(0 => 'caller_id', 1 => 'team_id', 2 => 'agent_id'), 'fieldset:Ticket:relation' => array(0 => 'related_change_id'))));
     MetaModel::Init_SetZListItems('standard_search', array(0 => 'ref', 1 => 'title', 2 => 'org_id', 3 => 'start_date', 4 => 'status', 5 => 'service_id', 6 => 'servicesubcategory_id', 7 => 'product', 8 => 'impact', 9 => 'urgency', 10 => 'priority', 11 => 'caller_id', 12 => 'team_id', 13 => 'agent_id', 14 => 'close_date'));
     MetaModel::Init_SetZListItems('list', array(0 => 'title', 1 => 'org_id', 2 => 'start_date', 3 => 'status', 4 => 'service_id', 5 => 'priority'));
 }
开发者ID:kira8565,项目名称:ITOP203-ZHCN,代码行数:39,代码来源:model.itop-problem-mgmt.php

示例9: Init

 public static function Init()
 {
     $aParams = array("category" => "core/cmdb", "key_type" => "autoincrement", "name_attcode" => "created", "state_attcode" => "", "reconc_keys" => array(), "db_table" => "priv_async_send_email", "db_key_field" => "id", "db_finalclass_field" => "", "display_template" => "");
     MetaModel::Init_Params($aParams);
     MetaModel::Init_InheritAttributes();
     MetaModel::Init_AddAttribute(new AttributeInteger("version", array("allowed_values" => null, "sql" => "version", "default_value" => Email::ORIGINAL_FORMAT, "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeText("to", array("allowed_values" => null, "sql" => "to", "default_value" => null, "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeText("subject", array("allowed_values" => null, "sql" => "subject", "default_value" => null, "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeLongText("message", array("allowed_values" => null, "sql" => "message", "default_value" => null, "is_null_allowed" => false, "depends_on" => array())));
     // Display lists
     //		MetaModel::Init_SetZListItems('details', array('name', 'description', 'status', 'test_recipient', 'from', 'reply_to', 'to', 'cc', 'bcc', 'subject', 'body', 'importance', 'trigger_list')); // Attributes to be displayed for the complete details
     //		MetaModel::Init_SetZListItems('list', array('name', 'status', 'to', 'subject')); // Attributes to be displayed for a list
     // Search criteria
     //		MetaModel::Init_SetZListItems('standard_search', array('name')); // Criteria of the std search form
     //		MetaModel::Init_SetZListItems('advanced_search', array('name')); // Criteria of the advanced search form
 }
开发者ID:kira8565,项目名称:ITOP203-ZHCN,代码行数:16,代码来源:asynctask.class.inc.php

示例10: Init

 public static function Init()
 {
     $aParams = array('category' => 'bizmodel,searchable', 'key_type' => 'autoincrement', 'name_attcode' => array('name', 'virtualmachine_name'), 'state_attcode' => '', 'reconc_keys' => array('name', 'virtualmachine_id', 'virtualmachine_name'), 'db_table' => 'logicalinterface', 'db_key_field' => 'id', 'db_finalclass_field' => '', 'icon' => utils::GetAbsoluteUrlModulesRoot() . 'itop-virtualization-mgmt/images/interface.png');
     MetaModel::Init_Params($aParams);
     MetaModel::Init_InheritAttributes();
     MetaModel::Init_AddAttribute(new AttributeExternalKey("virtualmachine_id", array("targetclass" => 'VirtualMachine', "allowed_values" => null, "sql" => 'virtualmachine_id', "is_null_allowed" => false, "on_target_delete" => DEL_AUTO, "depends_on" => array(), "display_style" => 'select', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalField("virtualmachine_name", array("allowed_values" => null, "extkey_attcode" => 'virtualmachine_id', "target_attcode" => 'name', "always_load_in_tables" => false)));
     MetaModel::Init_SetZListItems('details', array(0 => 'name', 1 => 'ipaddress', 2 => 'macaddress', 3 => 'comment', 4 => 'ipgateway', 5 => 'ipmask', 6 => 'speed', 7 => 'virtualmachine_id'));
     MetaModel::Init_SetZListItems('standard_search', array(0 => 'name', 1 => 'ipaddress', 2 => 'macaddress', 3 => 'ipgateway', 4 => 'ipmask'));
     MetaModel::Init_SetZListItems('list', array(0 => 'ipaddress', 1 => 'macaddress', 2 => 'comment', 3 => 'ipgateway', 4 => 'ipmask', 5 => 'speed'));
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:11,代码来源:model.itop-virtualization-mgmt.php

示例11: Init

 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_sync_replica", "db_key_field" => "id", "db_finalclass_field" => "", "display_template" => "");
     MetaModel::Init_Params($aParams);
     MetaModel::Init_InheritAttributes();
     MetaModel::Init_AddAttribute(new AttributeExternalKey("sync_source_id", array("targetclass" => "SynchroDataSource", "jointype" => "", "allowed_values" => null, "sql" => "sync_source_id", "is_null_allowed" => false, "on_target_delete" => DEL_SILENT, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeExternalField("base_class", array("allowed_values" => null, "extkey_attcode" => 'sync_source_id', "target_attcode" => "scope_class")));
     MetaModel::Init_AddAttribute(new AttributeInteger("dest_id", array("allowed_values" => null, "sql" => "dest_id", "default_value" => 0, "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeClass("dest_class", array("class_category" => "", "more_values" => "", "sql" => "dest_class", "default_value" => 'Organization', "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeDateTime("status_last_seen", array("allowed_values" => null, "sql" => "status_last_seen", "default_value" => "", "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeEnum("status", array("allowed_values" => new ValueSetEnum('new,synchronized,modified,orphan,obsolete'), "sql" => "status", "default_value" => "new", "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeBoolean("status_dest_creator", array("allowed_values" => null, "sql" => "status_dest_creator", "default_value" => 0, "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeString("status_last_error", array("allowed_values" => null, "sql" => "status_last_error", "default_value" => '', "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeString("status_last_warning", array("allowed_values" => null, "sql" => "status_last_warning", "default_value" => '', "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeDateTime("info_creation_date", array("allowed_values" => null, "sql" => "info_creation_date", "default_value" => "", "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeDateTime("info_last_modified", array("allowed_values" => null, "sql" => "info_last_modified", "default_value" => "", "is_null_allowed" => true, "depends_on" => array())));
     // Display lists
     MetaModel::Init_SetZListItems('details', array('' . 'col:0' => array('fieldset:SynchroDataSource:Definition' => array('sync_source_id', 'dest_id', 'dest_class'), 'fieldset:SynchroDataSource:Status' => array('status', 'status_last_seen', 'status_dest_creator', 'status_last_error', 'status_last_warning'), 'fieldset:SynchroDataSource:Information' => array('info_creation_date', 'info_last_modified'))));
     MetaModel::Init_SetZListItems('list', array('sync_source_id', 'dest_id', 'dest_class', 'status_last_seen', 'status', 'status_dest_creator', 'status_last_error', 'status_last_warning'));
     // Attributes to be displayed for a list
     // Search criteria
     MetaModel::Init_SetZListItems('standard_search', array('sync_source_id', 'status_last_seen', 'status', 'status_dest_creator', 'dest_class', 'dest_id', 'status_last_error', 'status_last_warning'));
     // Criteria of the std search form
     //		MetaModel::Init_SetZListItems('advanced_search', array('name')); // Criteria of the advanced search form
 }
开发者ID:kira8565,项目名称:ITOP203-ZHCN,代码行数:25,代码来源:synchrodatasource.class.inc.php

示例12: Init

 public static function Init()
 {
     $aParams = array('category' => 'bizmodel,searchable,changemgmt', 'key_type' => 'autoincrement', 'name_attcode' => 'ref', 'state_attcode' => 'status', 'reconc_keys' => array('ref'), 'db_table' => 'change_emergency', 'db_key_field' => 'id', 'db_finalclass_field' => '', 'icon' => utils::GetAbsoluteUrlModulesRoot() . 'itop-change-mgmt-itil/images/change.png', 'order_by_default' => array('ref' => false));
     MetaModel::Init_Params($aParams);
     MetaModel::Init_InheritAttributes();
     // Lifecycle (status attribute: status)
     //
     MetaModel::Init_DefineStimulus(new StimulusUserAction("ev_assign", array()));
     MetaModel::Init_DefineStimulus(new StimulusUserAction("ev_reopen", array()));
     MetaModel::Init_DefineStimulus(new StimulusUserAction("ev_plan", array()));
     MetaModel::Init_DefineStimulus(new StimulusUserAction("ev_approve", array()));
     MetaModel::Init_DefineStimulus(new StimulusUserAction("ev_replan", array()));
     MetaModel::Init_DefineStimulus(new StimulusUserAction("ev_notapprove", array()));
     MetaModel::Init_DefineStimulus(new StimulusUserAction("ev_implement", array()));
     MetaModel::Init_DefineStimulus(new StimulusUserAction("ev_monitor", array()));
     MetaModel::Init_DefineStimulus(new StimulusUserAction("ev_finish", array()));
     MetaModel::Init_DefineState("new", array("attribute_inherit" => '', "attribute_list" => array('ref' => OPT_ATT_READONLY, 'agent_id' => OPT_ATT_HIDDEN, 'team_id' => OPT_ATT_HIDDEN, 'title' => OPT_ATT_MANDATORY, 'start_date' => OPT_ATT_HIDDEN, 'end_date' => OPT_ATT_HIDDEN, 'last_update' => OPT_ATT_READONLY, 'close_date' => OPT_ATT_HIDDEN, 'reason' => OPT_ATT_HIDDEN, 'requestor_id' => OPT_ATT_MANDATORY, 'creation_date' => OPT_ATT_READONLY, 'impact' => OPT_ATT_HIDDEN, 'supervisor_group_id' => OPT_ATT_HIDDEN, 'supervisor_id' => OPT_ATT_HIDDEN, 'manager_group_id' => OPT_ATT_HIDDEN, 'manager_id' => OPT_ATT_HIDDEN, 'outage' => OPT_ATT_HIDDEN, 'fallback' => OPT_ATT_HIDDEN, 'approval_date' => OPT_ATT_HIDDEN, 'approval_comment' => OPT_ATT_HIDDEN)));
     MetaModel::Init_DefineTransition("new", "ev_assign", array("target_state" => "assigned", "actions" => array(), "user_restriction" => null));
     MetaModel::Init_DefineState("validated", array("attribute_inherit" => '', "attribute_list" => array('ref' => OPT_ATT_READONLY, 'agent_id' => OPT_ATT_HIDDEN, 'title' => OPT_ATT_MANDATORY, 'description' => OPT_ATT_READONLY, 'start_date' => OPT_ATT_HIDDEN, 'end_date' => OPT_ATT_HIDDEN, 'last_update' => OPT_ATT_READONLY, 'close_date' => OPT_ATT_HIDDEN, 'reason' => OPT_ATT_READONLY, 'requestor_id' => OPT_ATT_READONLY, 'creation_date' => OPT_ATT_READONLY, 'impact' => OPT_ATT_HIDDEN, 'team_id' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'supervisor_group_id' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'supervisor_id' => OPT_ATT_HIDDEN, 'manager_group_id' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'manager_id' => OPT_ATT_HIDDEN, 'outage' => OPT_ATT_HIDDEN, 'fallback' => OPT_ATT_HIDDEN, 'approval_date' => OPT_ATT_HIDDEN, 'approval_comment' => OPT_ATT_HIDDEN)));
     MetaModel::Init_DefineState("rejected", array("attribute_inherit" => '', "attribute_list" => array('ref' => OPT_ATT_READONLY, 'agent_id' => OPT_ATT_HIDDEN, 'title' => OPT_ATT_MANDATORY, 'start_date' => OPT_ATT_HIDDEN, 'end_date' => OPT_ATT_HIDDEN, 'last_update' => OPT_ATT_READONLY, 'close_date' => OPT_ATT_HIDDEN, 'reason' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'requestor_id' => OPT_ATT_MANDATORY, 'creation_date' => OPT_ATT_READONLY, 'impact' => OPT_ATT_HIDDEN, 'supervisor_group_id' => OPT_ATT_HIDDEN, 'supervisor_id' => OPT_ATT_HIDDEN, 'manager_group_id' => OPT_ATT_HIDDEN, 'manager_id' => OPT_ATT_HIDDEN, 'outage' => OPT_ATT_HIDDEN, 'fallback' => OPT_ATT_HIDDEN, 'approval_date' => OPT_ATT_HIDDEN, 'approval_comment' => OPT_ATT_HIDDEN)));
     MetaModel::Init_DefineState("assigned", array("attribute_inherit" => '', "attribute_list" => array('ref' => OPT_ATT_READONLY, 'agent_id' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'team_id' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'title' => OPT_ATT_MANDATORY, 'description' => OPT_ATT_READONLY, 'start_date' => OPT_ATT_HIDDEN, 'end_date' => OPT_ATT_HIDDEN, 'last_update' => OPT_ATT_READONLY, 'close_date' => OPT_ATT_HIDDEN, 'reason' => OPT_ATT_READONLY, 'requestor_id' => OPT_ATT_READONLY, 'creation_date' => OPT_ATT_READONLY, 'impact' => OPT_ATT_HIDDEN, 'supervisor_group_id' => OPT_ATT_MANDATORY, 'supervisor_id' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'manager_group_id' => OPT_ATT_MANDATORY, 'manager_id' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'outage' => OPT_ATT_HIDDEN, 'fallback' => OPT_ATT_HIDDEN, 'approval_date' => OPT_ATT_HIDDEN, 'approval_comment' => OPT_ATT_HIDDEN)));
     MetaModel::Init_DefineTransition("assigned", "ev_plan", array("target_state" => "plannedscheduled", "actions" => array(), "user_restriction" => null));
     MetaModel::Init_DefineState("plannedscheduled", array("attribute_inherit" => '', "attribute_list" => array('ref' => OPT_ATT_READONLY, 'org_id' => OPT_ATT_READONLY, 'agent_id' => OPT_ATT_MANDATORY, 'team_id' => OPT_ATT_MANDATORY, 'title' => OPT_ATT_MANDATORY, 'description' => OPT_ATT_READONLY, 'start_date' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'end_date' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'last_update' => OPT_ATT_READONLY, 'close_date' => OPT_ATT_HIDDEN, 'reason' => OPT_ATT_READONLY, 'requestor_id' => OPT_ATT_READONLY, 'creation_date' => OPT_ATT_READONLY, 'impact' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'supervisor_group_id' => OPT_ATT_MANDATORY, 'supervisor_id' => OPT_ATT_MANDATORY, 'manager_group_id' => OPT_ATT_MANDATORY, 'manager_id' => OPT_ATT_MANDATORY, 'outage' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'fallback' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'approval_date' => OPT_ATT_HIDDEN, 'approval_comment' => OPT_ATT_HIDDEN)));
     MetaModel::Init_DefineTransition("plannedscheduled", "ev_approve", array("target_state" => "approved", "actions" => array('ResetRejectReason'), "user_restriction" => null));
     MetaModel::Init_DefineTransition("plannedscheduled", "ev_notapprove", array("target_state" => "notapproved", "actions" => array(), "user_restriction" => null));
     MetaModel::Init_DefineState("approved", array("attribute_inherit" => '', "attribute_list" => array('ref' => OPT_ATT_READONLY, 'org_id' => OPT_ATT_READONLY, 'agent_id' => OPT_ATT_MANDATORY, 'team_id' => OPT_ATT_MANDATORY, 'title' => OPT_ATT_MANDATORY, 'description' => OPT_ATT_READONLY, 'start_date' => OPT_ATT_MANDATORY, 'end_date' => OPT_ATT_MANDATORY, 'last_update' => OPT_ATT_READONLY, 'close_date' => OPT_ATT_HIDDEN, 'reason' => OPT_ATT_READONLY, 'requestor_id' => OPT_ATT_READONLY, 'creation_date' => OPT_ATT_READONLY, 'impact' => OPT_ATT_READONLY, 'supervisor_group_id' => OPT_ATT_READONLY, 'supervisor_id' => OPT_ATT_READONLY, 'manager_group_id' => OPT_ATT_READONLY, 'manager_id' => OPT_ATT_READONLY, 'outage' => OPT_ATT_READONLY, 'fallback' => OPT_ATT_MANDATORY, 'approval_date' => OPT_ATT_MANDATORY, 'approval_comment' => OPT_ATT_MANDATORY)));
     MetaModel::Init_DefineTransition("approved", "ev_implement", array("target_state" => "implemented", "actions" => array(), "user_restriction" => null));
     MetaModel::Init_DefineState("notapproved", array("attribute_inherit" => '', "attribute_list" => array('ref' => OPT_ATT_READONLY, 'org_id' => OPT_ATT_READONLY, 'agent_id' => OPT_ATT_MANDATORY, 'team_id' => OPT_ATT_MANDATORY, 'title' => OPT_ATT_MANDATORY, 'description' => OPT_ATT_READONLY, 'start_date' => OPT_ATT_MANDATORY, 'end_date' => OPT_ATT_MANDATORY, 'last_update' => OPT_ATT_READONLY, 'close_date' => OPT_ATT_HIDDEN, 'reason' => OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT, 'requestor_id' => OPT_ATT_READONLY, 'creation_date' => OPT_ATT_READONLY, 'impact' => OPT_ATT_READONLY, 'supervisor_group_id' => OPT_ATT_READONLY, 'supervisor_id' => OPT_ATT_READONLY, 'manager_group_id' => OPT_ATT_READONLY, 'manager_id' => OPT_ATT_READONLY, 'outage' => OPT_ATT_MANDATORY, 'fallback' => OPT_ATT_MANDATORY, 'approval_date' => OPT_ATT_HIDDEN, 'approval_comment' => OPT_ATT_HIDDEN)));
     MetaModel::Init_DefineTransition("notapproved", "ev_replan", array("target_state" => "plannedscheduled", "actions" => array(), "user_restriction" => null));
     MetaModel::Init_DefineState("implemented", array("attribute_inherit" => '', "attribute_list" => array('ref' => OPT_ATT_READONLY, 'org_id' => OPT_ATT_READONLY, 'agent_id' => OPT_ATT_MANDATORY, 'team_id' => OPT_ATT_MANDATORY, 'title' => OPT_ATT_READONLY, 'description' => OPT_ATT_READONLY, 'start_date' => OPT_ATT_READONLY, 'end_date' => OPT_ATT_MANDATORY, 'last_update' => OPT_ATT_READONLY, 'close_date' => OPT_ATT_HIDDEN, 'reason' => OPT_ATT_READONLY, 'requestor_id' => OPT_ATT_READONLY, 'creation_date' => OPT_ATT_READONLY, 'impact' => OPT_ATT_READONLY, 'supervisor_group_id' => OPT_ATT_READONLY, 'supervisor_id' => OPT_ATT_READONLY, 'manager_group_id' => OPT_ATT_READONLY, 'manager_id' => OPT_ATT_READONLY, 'outage' => OPT_ATT_READONLY, 'fallback' => OPT_ATT_MANDATORY, 'approval_date' => OPT_ATT_READONLY, 'approval_comment' => OPT_ATT_READONLY)));
     MetaModel::Init_DefineTransition("implemented", "ev_monitor", array("target_state" => "monitored", "actions" => array(), "user_restriction" => null));
     MetaModel::Init_DefineTransition("implemented", "ev_finish", array("target_state" => "closed", "actions" => array('SetClosureDate'), "user_restriction" => null));
     MetaModel::Init_DefineState("monitored", array("attribute_inherit" => '', "attribute_list" => array('ref' => OPT_ATT_READONLY, 'org_id' => OPT_ATT_READONLY, 'team_id' => OPT_ATT_READONLY, 'agent_id' => OPT_ATT_READONLY, 'title' => OPT_ATT_READONLY, 'caller_id' => OPT_ATT_READONLY, 'team_id' => OPT_ATT_READONLY, 'parent_id' => OPT_ATT_READONLY, 'description' => OPT_ATT_READONLY, 'start_date' => OPT_ATT_READONLY, 'end_date' => OPT_ATT_READONLY, 'last_update' => OPT_ATT_READONLY, 'close_date' => OPT_ATT_HIDDEN, 'reason' => OPT_ATT_READONLY, 'requestor_id' => OPT_ATT_READONLY, 'creation_date' => OPT_ATT_READONLY, 'impact' => OPT_ATT_READONLY, 'supervisor_group_id' => OPT_ATT_READONLY, 'supervisor_id' => OPT_ATT_READONLY, 'manager_group_id' => OPT_ATT_READONLY, 'manager_id' => OPT_ATT_READONLY, 'outage' => OPT_ATT_READONLY, 'fallback' => OPT_ATT_READONLY, 'approval_date' => OPT_ATT_READONLY, 'approval_comment' => OPT_ATT_READONLY)));
     MetaModel::Init_DefineTransition("monitored", "ev_finish", array("target_state" => "closed", "actions" => array('SetClosureDate'), "user_restriction" => null));
     MetaModel::Init_DefineState("closed", array("attribute_inherit" => '', "attribute_list" => array('ref' => OPT_ATT_READONLY, 'org_id' => OPT_ATT_READONLY, 'agent_id' => OPT_ATT_READONLY, 'team_id' => OPT_ATT_READONLY, 'caller_id' => OPT_ATT_READONLY, 'title' => OPT_ATT_READONLY, 'description' => OPT_ATT_READONLY, 'start_date' => OPT_ATT_READONLY, 'end_date' => OPT_ATT_READONLY, 'last_update' => OPT_ATT_READONLY, 'close_date' => OPT_ATT_READONLY, 'reason' => OPT_ATT_READONLY, 'requestor_id' => OPT_ATT_READONLY, 'creation_date' => OPT_ATT_READONLY, 'impact' => OPT_ATT_READONLY, 'team_id' => OPT_ATT_READONLY, 'supervisor_group_id' => OPT_ATT_READONLY, 'supervisor_id' => OPT_ATT_READONLY, 'manager_group_id' => OPT_ATT_READONLY, 'manager_id' => OPT_ATT_READONLY, 'outage' => OPT_ATT_READONLY, 'fallback' => OPT_ATT_READONLY, 'private_log' => OPT_ATT_READONLY, 'approval_date' => OPT_ATT_READONLY, 'approval_comment' => OPT_ATT_READONLY, 'parent_id' => OPT_ATT_READONLY)));
     MetaModel::Init_SetZListItems('details', array(0 => 'functionalcis_list', 1 => 'contacts_list', 2 => 'workorders_list', 3 => 'related_request_list', 4 => 'related_incident_list', 5 => 'related_problems_list', 6 => 'child_changes_list', 'col:col1' => array('fieldset:Ticket:baseinfo' => array(0 => 'ref', 1 => 'org_id', 2 => 'status', 3 => 'title', 4 => 'description', 5 => 'approval_comment'), 'fieldset:Ticket:contact' => array(0 => 'caller_id', 1 => 'team_id', 2 => 'agent_id', 3 => 'supervisor_group_id', 4 => 'supervisor_id', 5 => 'manager_group_id', 6 => 'manager_id')), 'col:col2' => array('fieldset:Ticket:resolution' => array(0 => 'reason', 1 => 'impact', 2 => 'outage', 3 => 'fallback'), 'fieldset:Ticket:relation' => array(0 => 'parent_id')), 'col:col3' => array('fieldset:Ticket:date' => array(0 => 'creation_date', 1 => 'start_date', 2 => 'end_date', 3 => 'last_update', 4 => 'approval_date', 5 => 'close_date'))));
     MetaModel::Init_SetZListItems('standard_search', array(0 => 'ref', 1 => 'org_id', 2 => 'status', 3 => 'title', 4 => 'description', 5 => 'caller_id', 6 => 'team_id', 7 => 'agent_id', 8 => 'supervisor_group_id', 9 => 'supervisor_id', 10 => 'manager_group_id', 11 => 'manager_id', 12 => 'reason', 13 => 'impact', 14 => 'outage', 15 => 'parent_id', 16 => 'creation_date', 17 => 'start_date', 18 => 'end_date', 19 => 'last_update', 20 => 'approval_date', 21 => 'close_date'));
     MetaModel::Init_SetZListItems('list', array(0 => 'finalclass', 1 => 'title', 2 => 'org_id', 3 => 'start_date', 4 => 'end_date', 5 => 'status', 6 => 'agent_id'));
 }
开发者ID:kira8565,项目名称:ITOP203-ZHCN,代码行数:39,代码来源:model.itop-change-mgmt-itil.php

示例13: Init

 public static function Init()
 {
     $aParams = array('category' => 'bizmodel,searchable,knownerrormgmt', 'key_type' => 'autoincrement', 'name_attcode' => 'name', 'state_attcode' => '', 'reconc_keys' => array('name'), 'db_table' => 'faqcategory', 'db_key_field' => 'id', 'db_finalclass_field' => '');
     MetaModel::Init_Params($aParams);
     MetaModel::Init_InheritAttributes();
     MetaModel::Init_AddAttribute(new AttributeString("name", array("allowed_values" => null, "sql" => 'nam', "default_value" => '', "is_null_allowed" => false, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeLinkedSet("faq_list", array("linked_class" => 'FAQ', "ext_key_to_me" => 'category_id', "count_min" => 0, "count_max" => 0, "edit_mode" => LINKSET_EDITMODE_ADDONLY, "allowed_values" => null, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_SetZListItems('details', array(0 => 'name', 1 => 'faq_list'));
     MetaModel::Init_SetZListItems('standard_search', array(0 => 'name'));
 }
开发者ID:kira8565,项目名称:ITOP203-ZHCN,代码行数:10,代码来源:model.itop-knownerror-mgmt.php

示例14: Init

 public static function Init()
 {
     $aParams = array("category" => "core/cmdb,bizmodel", "key_type" => "autoincrement", "name_attcode" => "name", "state_attcode" => "", "reconc_keys" => array('name'), "db_table" => "priv_action_email", "db_key_field" => "id", "db_finalclass_field" => "", "display_template" => "");
     MetaModel::Init_Params($aParams);
     MetaModel::Init_InheritAttributes();
     MetaModel::Init_AddAttribute(new AttributeEmailAddress("test_recipient", array("allowed_values" => null, "sql" => "test_recipient", "default_value" => "", "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeString("from", array("allowed_values" => null, "sql" => "from", "default_value" => null, "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeString("reply_to", array("allowed_values" => null, "sql" => "reply_to", "default_value" => null, "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeOQL("to", array("allowed_values" => null, "sql" => "to", "default_value" => null, "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeOQL("cc", array("allowed_values" => null, "sql" => "cc", "default_value" => null, "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeOQL("bcc", array("allowed_values" => null, "sql" => "bcc", "default_value" => null, "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeTemplateString("subject", array("allowed_values" => null, "sql" => "subject", "default_value" => null, "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeTemplateText("body", array("allowed_values" => null, "sql" => "body", "default_value" => null, "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeEnum("importance", array("allowed_values" => new ValueSetEnum('low,normal,high'), "sql" => "importance", "default_value" => 'normal', "is_null_allowed" => false, "depends_on" => array())));
     // Display lists
     MetaModel::Init_SetZListItems('details', array('name', 'description', 'status', 'test_recipient', 'from', 'reply_to', 'to', 'cc', 'bcc', 'subject', 'body', 'importance', 'trigger_list'));
     // Attributes to be displayed for the complete details
     MetaModel::Init_SetZListItems('list', array('name', 'status', 'to', 'subject'));
     // Attributes to be displayed for a list
     // Search criteria
     MetaModel::Init_SetZListItems('standard_search', array('name', 'description', 'status', 'subject'));
     // Criteria of the std search form
     //		MetaModel::Init_SetZListItems('advanced_search', array('name')); // Criteria of the advanced search form
 }
开发者ID:kira8565,项目名称:ITOP203-ZHCN,代码行数:24,代码来源:action.class.inc.php

示例15: Init

 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_shellexec", "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 AttributeText("log", array("allowed_values" => null, "sql" => "log", "default_value" => null, "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_SetZListItems('details', array('date', 'message', 'userinfo', 'trigger_id', 'action_id', 'object_id', 'log'));
     MetaModel::Init_SetZListItems('list', array('date', 'message'));
     // Search criteria
     // MetaModel::Init_SetZListItems('standard_search', array('name')); // Criteria of the std search form
     // MetaModel::Init_SetZListItems('advanced_search', array('name')); // Criteria of the advanced search form
 }
开发者ID:itop-itsm-ru,项目名称:action-shell-exec,代码行数:12,代码来源:main.action-shell-exec.php


注:本文中的MetaModel::Init_InheritAttributes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。