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


PHP MetaModel::Init_SetZListItems方法代码示例

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


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

示例1: Init

 public static function Init()
 {
     $aParams = array("category" => "application", "key_type" => "autoincrement", "name_attcode" => "name", "state_attcode" => "", "reconc_keys" => array(), "db_table" => "priv_iotask", "db_key_field" => "id", "db_finalclass_field" => "", "display_template" => "");
     MetaModel::Init_Params($aParams);
     MetaModel::Init_AddAttribute(new AttributeString("name", array("allowed_values" => null, "sql" => "name", "default_value" => "", "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeString("description", array("allowed_values" => null, "sql" => "description", "default_value" => "", "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeEnum("category", array("allowed_values" => new ValueSetEnum('Input, Ouput'), "sql" => "category", "default_value" => "Input", "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeEnum("source_type", array("allowed_values" => new ValueSetEnum('File, Database, Web Service'), "sql" => "source_type", "default_value" => "File", "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeEnum("source_subtype", array("allowed_values" => new ValueSetEnum('Oracle, MySQL, Postgress, MSSQL, SOAP, HTTP-Get, HTTP-Post, XML/RPC, CSV, XML, Excel'), "sql" => "source_subtype", "default_value" => "CSV", "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeString("source_path", array("allowed_values" => null, "sql" => "source_path", "default_value" => "", "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeClass("objects_class", array("class_category" => "", "more_values" => "", "sql" => "objects_class", "default_value" => null, "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeEnum("test_mode", array("allowed_values" => new ValueSetEnum('Yes,No'), "sql" => "test_mode", "default_value" => 'No', "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeEnum("verbose_mode", array("allowed_values" => new ValueSetEnum('Yes,No'), "sql" => "verbose_mode", "default_value" => 'No', "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeEnum("options", array("allowed_values" => new ValueSetEnum('Full, Update Only, Creation Only'), "sql" => "options", "default_value" => 'Full', "is_null_allowed" => true, "depends_on" => array())));
     // Display lists
     MetaModel::Init_SetZListItems('details', array('name', 'description', 'category', 'objects_class', 'source_type', 'source_subtype', 'source_path', 'options', 'test_mode', 'verbose_mode'));
     // Attributes to be displayed for the complete details
     MetaModel::Init_SetZListItems('list', array('description', 'category', 'objects_class', 'source_type', 'source_subtype', 'options'));
     // Attributes to be displayed for a list
     // Search criteria
     MetaModel::Init_SetZListItems('standard_search', array('name', 'category', 'objects_class', 'source_type', 'source_subtype'));
     // Criteria of the std search form
     MetaModel::Init_SetZListItems('advanced_search', array('name', 'description', 'category', 'objects_class', 'source_type', 'source_subtype'));
     // Criteria of the advanced search form
 }
开发者ID:kira8565,项目名称:ITOP203-ZHCN,代码行数:25,代码来源:iotask.class.inc.php

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例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,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

示例9: Init

 public static function Init()
 {
     $aParams = array("category" => "application", "key_type" => "autoincrement", "name_attcode" => "name", "state_attcode" => "", "reconc_keys" => array('name'), "db_table" => "priv_auditcategory", "db_key_field" => "id", "db_finalclass_field" => "");
     MetaModel::Init_Params($aParams);
     MetaModel::Init_AddAttribute(new AttributeString("name", array("description" => "Short name for this category", "allowed_values" => null, "sql" => "name", "default_value" => "", "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeString("description", array("allowed_values" => null, "sql" => "description", "default_value" => "", "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeOQL("definition_set", array("allowed_values" => null, "sql" => "definition_set", "default_value" => "", "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeLinkedSet("rules_list", array("linked_class" => "AuditRule", "ext_key_to_me" => "category_id", "allowed_values" => null, "count_min" => 0, "count_max" => 0, "depends_on" => array(), "edit_mode" => LINKSET_EDITMODE_INPLACE)));
     // Display lists
     MetaModel::Init_SetZListItems('details', array('name', 'description', 'definition_set', 'rules_list'));
     // 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'));
     // Criteria of the std search form
     MetaModel::Init_SetZListItems('advanced_search', array('name', 'description', 'definition_set'));
     // Criteria of the advanced search form
 }
开发者ID:henryavila,项目名称:itop,代码行数:19,代码来源:audit.category.class.inc.php

示例10: Init

 public static function Init()
 {
     $aParams = array("category" => "core,view_in_gui", "key_type" => "autoincrement", "name_attcode" => "", "state_attcode" => "", "reconc_keys" => array(), "db_table" => "priv_module_install", "db_key_field" => "id", "db_finalclass_field" => "", "display_template" => "");
     MetaModel::Init_Params($aParams);
     //MetaModel::Init_InheritAttributes();
     MetaModel::Init_AddAttribute(new AttributeString("name", array("allowed_values" => null, "sql" => "name", "default_value" => null, "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeString("version", array("allowed_values" => null, "sql" => "version", "default_value" => null, "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeDateTime("installed", array("allowed_values" => null, "sql" => "installed", "default_value" => null, "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeText("comment", array("allowed_values" => null, "sql" => "comment", "default_value" => null, "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeExternalKey("parent_id", array("targetclass" => "ModuleInstallation", "jointype" => "", "allowed_values" => null, "sql" => "parent_id", "is_null_allowed" => true, "on_target_delete" => DEL_MANUAL, "depends_on" => array())));
     // Display lists
     MetaModel::Init_SetZListItems('details', array('name', 'version', 'installed', 'comment', 'parent_id'));
     // Attributes to be displayed for the complete details
     MetaModel::Init_SetZListItems('list', array('name', 'version', 'installed', 'parent_id'));
     // 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,代码行数:19,代码来源:moduleinstallation.class.inc.php

示例11: Init

 public static function Init()
 {
     $aParams = array("category" => "application", "key_type" => "autoincrement", "name_attcode" => "name", "state_attcode" => "", "reconc_keys" => array('name'), "db_table" => "priv_auditrule", "db_key_field" => "id", "db_finalclass_field" => "", "display_template" => "");
     MetaModel::Init_Params($aParams);
     MetaModel::Init_AddAttribute(new AttributeString("name", array("allowed_values" => null, "sql" => "name", "default_value" => "", "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeString("description", array("allowed_values" => null, "sql" => "description", "default_value" => "", "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeOQL("query", array("allowed_values" => null, "sql" => "query", "default_value" => "", "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeEnum("valid_flag", array("allowed_values" => new ValueSetEnum('true,false'), "sql" => "valid_flag", "default_value" => "true", "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeExternalKey("category_id", array("allowed_values" => null, "sql" => "category_id", "targetclass" => "AuditCategory", "is_null_allowed" => false, "on_target_delete" => DEL_MANUAL, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeExternalField("category_name", array("allowed_values" => null, "extkey_attcode" => 'category_id', "target_attcode" => "name")));
     // Display lists
     MetaModel::Init_SetZListItems('details', array('category_id', 'name', 'description', 'query', 'valid_flag'));
     // Attributes to be displayed for the complete details
     MetaModel::Init_SetZListItems('list', array('category_id', 'description', 'valid_flag'));
     // Attributes to be displayed for a list
     // Search criteria
     MetaModel::Init_SetZListItems('standard_search', array('category_id', 'name', 'description', 'valid_flag'));
     // Criteria of the std search form
     MetaModel::Init_SetZListItems('advanced_search', array('category_id', 'name', 'description', 'valid_flag', 'query'));
     // Criteria of the advanced search form
 }
开发者ID:kira8565,项目名称:ITOP203-ZHCN,代码行数:21,代码来源:audit.rule.class.inc.php

示例12: 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

示例13: Init

 public static function Init()
 {
     $aParams = array("category" => "gui,view_in_gui", "key_type" => "autoincrement", "name_attcode" => "name", "state_attcode" => "", "reconc_keys" => array(), "db_table" => "priv_shortcut_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())));
     MetaModel::Init_AddAttribute(new AttributeEnum("auto_reload", array("allowed_values" => new ValueSetEnum('none,custom'), "sql" => "auto_reload", "default_value" => "none", "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeInteger("auto_reload_sec", array("allowed_values" => null, "sql" => "auto_reload_sec", "default_value" => 60, "is_null_allowed" => false, "depends_on" => array())));
     // Display lists
     MetaModel::Init_SetZListItems('details', array('name', 'context', 'oql'));
     // Attributes to be displayed for the complete details
     MetaModel::Init_SetZListItems('list', array('name'));
     // 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,代码行数:17,代码来源:shortcut.class.inc.php

示例14: 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

示例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_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


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