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


PHP utils::GetAbsoluteUrlModulesRoot方法代码示例

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


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

示例1: OnMenuCreation

 public static function OnMenuCreation()
 {
     if (UserRights::IsAdministrator()) {
         $oAdminMenu = new MenuGroup('AdminTools', 80);
         new WebPageMenuNode('ConfigEditor', utils::GetAbsoluteUrlModulesRoot() . 'itop-config/config.php', $oAdminMenu->GetIndex(), 18);
     }
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:7,代码来源:main.itop-config.php

示例2: DisplayLoginHeader

 public function DisplayLoginHeader($bMainAppLogo = false)
 {
     if ($bMainAppLogo) {
         $sLogo = 'itop-logo.png';
         $sBrandingLogo = 'main-logo.png';
     } else {
         $sLogo = 'itop-logo-external.png';
         $sBrandingLogo = 'login-logo.png';
     }
     $sVersionShort = Dict::Format('UI:iTopVersion:Short', ITOP_VERSION);
     $sIconUrl = Utils::GetConfig()->Get('app_icon_url');
     $sDisplayIcon = utils::GetAbsoluteUrlAppRoot() . 'images/' . $sLogo . '?itopversion=' . ITOP_VERSION;
     if (file_exists(MODULESROOT . 'branding/' . $sBrandingLogo)) {
         $sDisplayIcon = utils::GetAbsoluteUrlModulesRoot() . 'branding/' . $sBrandingLogo . '?itopversion=' . ITOP_VERSION;
     }
     $this->add("<div id=\"login-logo\"><a href=\"" . htmlentities($sIconUrl, ENT_QUOTES, 'UTF-8') . "\"><img title=\"{$sVersionShort}\" src=\"{$sDisplayIcon}\"></a></div>\n");
 }
开发者ID:besmirzanaj,项目名称:itop-code,代码行数:17,代码来源:loginwebpage.class.inc.php

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

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

示例5: Init

 public static function Init()
 {
     $aParams = array('category' => 'bizmodel,searchable,configmgmt', 'key_type' => 'autoincrement', 'name_attcode' => 'name', 'state_attcode' => '', 'reconc_keys' => array('name', 'org_id', 'owner_name'), 'db_table' => 'group', 'db_key_field' => 'id', 'db_finalclass_field' => '', 'icon' => utils::GetAbsoluteUrlModulesRoot() . 'itop-config-mgmt/images/group.png');
     MetaModel::Init_Params($aParams);
     MetaModel::Init_InheritAttributes();
     MetaModel::Init_AddAttribute(new AttributeString("name", array("allowed_values" => null, "sql" => 'name', "default_value" => '', "is_null_allowed" => false, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeEnum("status", array("allowed_values" => new ValueSetEnum("production,implementation,obsolete"), "display_style" => 'list', "sql" => 'status', "default_value" => 'implementation', "is_null_allowed" => false, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalKey("org_id", array("targetclass" => 'Organization', "allowed_values" => null, "sql" => 'org_id', "is_null_allowed" => false, "on_target_delete" => DEL_MANUAL, "depends_on" => array(), "display_style" => 'select', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalField("owner_name", array("allowed_values" => null, "extkey_attcode" => 'org_id', "target_attcode" => 'name', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeText("description", array("allowed_values" => null, "sql" => 'description', "default_value" => '', "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeString("type", array("allowed_values" => null, "sql" => 'type', "default_value" => '', "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeHierarchicalKey("parent_id", array("allowed_values" => null, "sql" => 'parent_id', "is_null_allowed" => true, "on_target_delete" => DEL_MANUAL, "depends_on" => array('org_id'), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalField("parent_name", array("allowed_values" => null, "extkey_attcode" => 'parent_id', "target_attcode" => 'name', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("ci_list", array("linked_class" => 'lnkGroupToCI', "ext_key_to_me" => 'group_id', "ext_key_to_remote" => 'ci_id', "allowed_values" => null, "count_min" => 0, "count_max" => 0, "duplicates" => false, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_SetZListItems('details', array(0 => 'name', 1 => 'status', 2 => 'org_id', 3 => 'type', 4 => 'description', 5 => 'parent_id', 6 => 'ci_list'));
     MetaModel::Init_SetZListItems('standard_search', array(0 => 'name', 1 => 'status', 2 => 'org_id', 3 => 'type'));
     MetaModel::Init_SetZListItems('list', array(0 => 'status', 1 => 'org_id', 2 => 'type', 3 => 'parent_id'));
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:18,代码来源:model.itop-config-mgmt.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' => '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

示例7: Init

 public static function Init()
 {
     $aParams = array('category' => 'bizmodel,searchable,knownerrormgmt', 'key_type' => 'autoincrement', 'name_attcode' => 'title', 'state_attcode' => '', 'reconc_keys' => array('title'), 'db_table' => 'faq', 'db_key_field' => 'id', 'db_finalclass_field' => '', 'icon' => utils::GetAbsoluteUrlModulesRoot() . 'itop-knownerror-mgmt/images/faq.png');
     MetaModel::Init_Params($aParams);
     MetaModel::Init_InheritAttributes();
     MetaModel::Init_AddAttribute(new AttributeString("title", array("allowed_values" => null, "sql" => 'title', "default_value" => '', "is_null_allowed" => false, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeText("summary", array("allowed_values" => null, "sql" => 'summary', "default_value" => '', "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeHTML("description", array("allowed_values" => null, "sql" => 'description', "default_value" => '', "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalKey("category_id", array("targetclass" => 'FAQCategory', "allowed_values" => null, "sql" => 'category_id', "is_null_allowed" => false, "on_target_delete" => DEL_MANUAL, "depends_on" => array(), "display_style" => 'select', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalField("category_name", array("allowed_values" => null, "extkey_attcode" => 'category_id', "target_attcode" => 'name', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeString("error_code", array("allowed_values" => null, "sql" => 'error_code', "default_value" => '', "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeString("key_words", array("allowed_values" => null, "sql" => 'key_words', "default_value" => '', "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_SetZListItems('details', array(0 => 'category_id', 1 => 'title', 2 => 'error_code', 3 => 'key_words', 4 => 'summary', 5 => 'description'));
     MetaModel::Init_SetZListItems('standard_search', array(0 => 'category_id', 1 => 'title', 2 => 'summary', 3 => 'error_code', 4 => 'key_words'));
     MetaModel::Init_SetZListItems('list', array(0 => 'category_id', 1 => 'error_code', 2 => 'key_words'));
 }
开发者ID:kira8565,项目名称:ITOP203-ZHCN,代码行数:16,代码来源:model.itop-knownerror-mgmt.php

示例8: GetAbsoluteUrlModulesRoot

 public function GetAbsoluteUrlModulesRoot()
 {
     return utils::GetAbsoluteUrlModulesRoot();
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:4,代码来源:nicewebpage.class.inc.php

示例9: Init

 public static function Init()
 {
     $aParams = array('category' => 'bizmodel,searchable', 'key_type' => 'autoincrement', 'name_attcode' => 'name', 'state_attcode' => '', 'reconc_keys' => array('name', 'org_id', 'organization_name'), 'db_table' => 'peripheral', 'db_key_field' => 'id', 'db_finalclass_field' => '', 'icon' => utils::GetAbsoluteUrlModulesRoot() . 'itop-endusers-devices/images/peripherals.png');
     MetaModel::Init_Params($aParams);
     MetaModel::Init_InheritAttributes();
     MetaModel::Init_SetZListItems('details', array(0 => 'name', 1 => 'org_id', 2 => 'status', 3 => 'business_criticity', 4 => 'location_id', 5 => 'brand_id', 6 => 'model_id', 7 => 'serialnumber', 8 => 'asset_number', 9 => 'move2production', 10 => 'purchase_date', 11 => 'end_of_warranty', 12 => 'description', 13 => 'contacts_list', 14 => 'documents_list', 15 => 'providercontracts_list', 16 => 'services_list'));
     MetaModel::Init_SetZListItems('standard_search', array(0 => 'name', 1 => 'org_id', 2 => 'status', 3 => 'business_criticity', 4 => 'location_id', 5 => 'brand_id', 6 => 'model_id', 7 => 'serialnumber', 8 => 'asset_number', 9 => 'move2production', 10 => 'purchase_date', 11 => 'end_of_warranty'));
     MetaModel::Init_SetZListItems('list', array(0 => 'org_id', 1 => 'status', 2 => 'business_criticity', 3 => 'location_id', 4 => 'brand_id', 5 => 'model_id', 6 => 'serialnumber'));
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:9,代码来源:model.itop-endusers-devices.php

示例10: ApplyParams

 /**
  * Replaces all the parameters by the values passed in the hash array
  */
 public static function ApplyParams($sInput, $aParams)
 {
     // Declare magic parameters
     $aParams['APP_URL'] = utils::GetAbsoluteUrlAppRoot();
     $aParams['MODULES_URL'] = utils::GetAbsoluteUrlModulesRoot();
     $aSearches = array();
     $aReplacements = array();
     foreach ($aParams as $sSearch => $replace) {
         // Some environment parameters are objects, we just need scalars
         if (is_object($replace)) {
             $iPos = strpos($sSearch, '->object()');
             if ($iPos !== false) {
                 // Expand the parameters for the object
                 $sName = substr($sSearch, 0, $iPos);
                 if (preg_match_all('/\\$' . $sName . '->([^\\$]+)\\$/', $sInput, $aMatches)) {
                     foreach ($aMatches[1] as $sPlaceholderAttCode) {
                         try {
                             $sReplacement = $replace->GetForTemplate($sPlaceholderAttCode);
                             if ($sReplacement !== null) {
                                 $aReplacements[] = $sReplacement;
                                 $aSearches[] = '$' . $sName . '->' . $sPlaceholderAttCode . '$';
                             }
                         } catch (Exception $e) {
                             // No replacement will occur
                         }
                     }
                 }
             } else {
                 continue;
                 // Ignore this non-scalar value
             }
         }
         $aSearches[] = '$' . $sSearch . '$';
         $aReplacements[] = (string) $replace;
     }
     return str_replace($aSearches, $aReplacements, $sInput);
 }
开发者ID:henryavila,项目名称:itop,代码行数:40,代码来源:metamodel.class.php

示例11: GetDefaultValue

 public function GetDefaultValue($sClass = 'Contact')
 {
     $sIconPath = MetaModel::GetClassIcon($sClass, false);
     $sIcon = str_replace(utils::GetAbsoluteUrlModulesRoot(), '', $sIconPath);
     return $sIcon;
 }
开发者ID:arberya,项目名称:itop,代码行数:6,代码来源:forms.class.inc.php

示例12: Init

 public static function Init()
 {
     $aParams = array('category' => 'bizmodel,searchable,incidentmgmt,requestmgmt,changemgmt,m2prequest', 'key_type' => 'autoincrement', 'name_attcode' => 'name', 'state_attcode' => 'status', 'reconc_keys' => array('name', 'ticket_id'), 'db_table' => 'workorder', 'db_key_field' => 'id', 'db_finalclass_field' => '', 'icon' => utils::GetAbsoluteUrlModulesRoot() . 'itop-tickets/images/workorder.png');
     MetaModel::Init_Params($aParams);
     MetaModel::Init_InheritAttributes();
     MetaModel::Init_AddAttribute(new AttributeString("name", array("allowed_values" => null, "sql" => 'name', "default_value" => '', "is_null_allowed" => false, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeEnum("status", array("allowed_values" => new ValueSetEnum("open,closed"), "display_style" => 'list', "sql" => 'status', "default_value" => 'open', "is_null_allowed" => false, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeText("description", array("allowed_values" => null, "sql" => 'description', "default_value" => '', "is_null_allowed" => false, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalKey("ticket_id", array("targetclass" => 'Ticket', "allowed_values" => null, "sql" => 'ticket_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("ticket_ref", array("allowed_values" => null, "extkey_attcode" => 'ticket_id', "target_attcode" => 'ref', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalKey("team_id", array("targetclass" => 'Team', "allowed_values" => new ValueSetObjects("SELECT Team"), "sql" => 'team_id', "is_null_allowed" => false, "on_target_delete" => DEL_MANUAL, "depends_on" => array(), "display_style" => 'select', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalField("team_name", array("allowed_values" => null, "extkey_attcode" => 'team_id', "target_attcode" => 'email', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalKey("agent_id", array("targetclass" => 'Person', "allowed_values" => new ValueSetObjects("SELECT Person AS p JOIN lnkPersonToTeam AS l ON l.person_id=p.id JOIN Team AS t ON l.team_id=t.id WHERE t.id = :this->team_id"), "sql" => 'owner_id', "is_null_allowed" => true, "on_target_delete" => DEL_MANUAL, "depends_on" => array('team_id'), "allow_target_creation" => false, "display_style" => 'select', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalField("agent_email", array("allowed_values" => null, "extkey_attcode" => 'agent_id', "target_attcode" => 'email', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeDateTime("start_date", array("allowed_values" => null, "sql" => 'start_date', "default_value" => '', "is_null_allowed" => false, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeDateTime("end_date", array("allowed_values" => null, "sql" => 'end_date', "default_value" => '', "is_null_allowed" => false, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeCaseLog("log", array("allowed_values" => null, "sql" => 'log', "default_value" => '', "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false)));
     // Lifecycle (status attribute: status)
     //
     MetaModel::Init_DefineStimulus(new StimulusUserAction("ev_close", array()));
     MetaModel::Init_DefineState("open", array("attribute_inherit" => '', "attribute_list" => array()));
     MetaModel::Init_DefineTransition("open", "ev_close", array("target_state" => "closed", "actions" => array(), "user_restriction" => null));
     MetaModel::Init_DefineState("closed", array("attribute_inherit" => '', "attribute_list" => array()));
     MetaModel::Init_SetZListItems('details', array(0 => 'name', 1 => 'status', 2 => 'ticket_id', 3 => 'team_id', 4 => 'agent_id', 5 => 'description', 6 => 'start_date', 7 => 'end_date'));
     MetaModel::Init_SetZListItems('standard_search', array(0 => 'name', 1 => 'status', 2 => 'ticket_id', 3 => 'team_id', 4 => 'agent_id', 5 => 'start_date', 6 => 'end_date'));
     MetaModel::Init_SetZListItems('list', array(0 => 'status', 1 => 'ticket_id', 2 => 'start_date', 3 => 'end_date', 4 => 'team_id', 5 => 'agent_id'));
 }
开发者ID:kira8565,项目名称:ITOP203-ZHCN,代码行数:27,代码来源:model.itop-tickets.php

示例13: Init

 public static function Init()
 {
     $aParams = array('category' => 'bizmodel,searchable', 'key_type' => 'autoincrement', 'name_attcode' => 'name', 'state_attcode' => '', 'reconc_keys' => array('name', 'org_id', 'organization_name'), 'db_table' => 'pdu', 'db_key_field' => 'id', 'db_finalclass_field' => '', 'icon' => utils::GetAbsoluteUrlModulesRoot() . 'itop-datacenter-mgmt/images/pdu.png');
     MetaModel::Init_Params($aParams);
     MetaModel::Init_InheritAttributes();
     MetaModel::Init_AddAttribute(new AttributeExternalKey("rack_id", array("targetclass" => 'Rack', "allowed_values" => new ValueSetObjects("SELECT Rack WHERE location_id= :this->location_id"), "sql" => 'rack_id', "is_null_allowed" => false, "on_target_delete" => DEL_MANUAL, "depends_on" => array('location_id'), "allow_target_creation" => false, "display_style" => 'select', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalField("rack_name", array("allowed_values" => null, "extkey_attcode" => 'rack_id', "target_attcode" => 'name', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalKey("powerstart_id", array("targetclass" => 'PowerConnection', "allowed_values" => new ValueSetObjects("SELECT PowerConnection WHERE id != :this->id AND location_id = :this->location_id"), "sql" => 'powerstart_id', "is_null_allowed" => true, "on_target_delete" => DEL_MANUAL, "depends_on" => array('location_id'), "allow_target_creation" => false, "display_style" => 'select', "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeExternalField("powerstart_name", array("allowed_values" => null, "extkey_attcode" => 'powerstart_id', "target_attcode" => 'name', "always_load_in_tables" => false)));
     MetaModel::Init_SetZListItems('details', array(0 => 'name', 1 => 'org_id', 2 => 'status', 3 => 'business_criticity', 4 => 'location_id', 5 => 'rack_id', 6 => 'powerstart_id', 7 => 'brand_id', 8 => 'model_id', 9 => 'serialnumber', 10 => 'asset_number', 11 => 'move2production', 12 => 'purchase_date', 13 => 'end_of_warranty', 14 => 'description', 15 => 'contacts_list', 16 => 'documents_list', 17 => 'providercontracts_list', 18 => 'services_list'));
     MetaModel::Init_SetZListItems('standard_search', array(0 => 'name', 1 => 'org_id', 2 => 'status', 3 => 'business_criticity', 4 => 'location_id', 5 => 'powerstart_id', 6 => 'brand_id', 7 => 'model_id', 8 => 'serialnumber', 9 => 'asset_number', 10 => 'move2production', 11 => 'purchase_date', 12 => 'end_of_warranty'));
     MetaModel::Init_SetZListItems('list', array(0 => 'org_id', 1 => 'status', 2 => 'business_criticity', 3 => 'location_id', 4 => 'brand_id', 5 => 'model_id', 6 => 'serialnumber'));
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:13,代码来源:model.itop-datacenter-mgmt.php

示例14: __construct

    public function __construct($sTitle, $sAlternateStyleSheet = '')
    {
        $this->m_sWelcomeMsg = '';
        $this->m_aMenuButtons = array();
        parent::__construct($sTitle);
        $this->add_header("Content-type: text/html; charset=utf-8");
        $this->add_header("Cache-control: no-cache");
        $this->add_linked_stylesheet("../css/jquery.treeview.css");
        $this->add_linked_stylesheet("../css/jquery.autocomplete.css");
        $this->add_linked_stylesheet("../css/jquery.multiselect.css");
        $sAbsURLAppRoot = addslashes(utils::GetAbsoluteUrlAppRoot());
        // Pass it to Javascript scripts
        $sAbsURLModulesRoot = addslashes(utils::GetAbsoluteUrlModulesRoot());
        // Pass it to Javascript scripts
        $oAppContext = new ApplicationContext();
        $sAppContext = addslashes($oAppContext->GetForLink());
        $this->add_dict_entry('UI:FillAllMandatoryFields');
        if ($sAlternateStyleSheet != '') {
            $this->add_linked_stylesheet("../portal/{$sAlternateStyleSheet}/portal.css");
        } else {
            $this->add_linked_stylesheet("../portal/portal.css");
        }
        $this->add_linked_script('../js/jquery.layout.min.js');
        $this->add_linked_script('../js/jquery.ba-bbq.min.js');
        $this->add_linked_script("../js/jquery.tablehover.js");
        $this->add_linked_script("../js/jquery.treeview.js");
        $this->add_linked_script("../js/jquery.autocomplete.js");
        $this->add_linked_script("../js/jquery.positionBy.js");
        $this->add_linked_script("../js/jquery.popupmenu.js");
        $this->add_linked_script("../js/date.js");
        $this->add_linked_script("../js/jquery.tablesorter.min.js");
        $this->add_linked_script("../js/jquery.tablesorter.pager.js");
        $this->add_linked_script("../js/jquery.blockUI.js");
        $this->add_linked_script("../js/utils.js");
        $this->add_linked_script("../js/forms-json-utils.js");
        $this->add_linked_script("../js/swfobject.js");
        $this->add_linked_script("../js/jquery.qtip-1.0.min.js");
        $this->add_linked_script('../js/jquery.multiselect.min.js');
        $this->add_linked_script("../js/ajaxfileupload.js");
        $this->add_ready_script(<<<EOF
try
{
\t//add new widget called TruncatedList to properly display truncated lists when they are sorted
\t\$.tablesorter.addWidget({ 
\t    // give the widget a id 
\t    id: "truncatedList", 
\t    // format is called when the on init and when a sorting has finished 
\t    format: function(table)
\t    { 
\t\t\t// Check if there is a "truncated" line
\t\t\tthis.truncatedList = false;  
\t\t\tif (\$("tr td.truncated",table).length > 0)
\t\t\t{
\t\t\t\tthis.truncatedList = true;
\t\t\t}
\t\t\tif (this.truncatedList)
\t\t\t{
\t\t\t\t\$("tr td",table).removeClass('truncated');
\t\t\t\t\$("tr:last td",table).addClass('truncated');
\t\t\t}
\t    } 
\t});
\t\t
\t
\t\$.tablesorter.addWidget({ 
\t    // give the widget a id 
\t    id: "myZebra", 
\t    // format is called when the on init and when a sorting has finished 
\t    format: function(table)
\t    {
\t    \t// Replace the 'red even' lines by 'red_even' since most browser do not support 2 classes selector in CSS, etc..
\t\t\t\$("tbody tr:even",table).addClass('even');
\t\t\t\$("tbody tr.red:even",table).removeClass('red').removeClass('even').addClass('red_even');
\t\t\t\$("tbody tr.orange:even",table).removeClass('orange').removeClass('even').addClass('orange_even');
\t\t\t\$("tbody tr.green:even",table).removeClass('green').removeClass('even').addClass('green_even');
\t    } 
\t});
\t\t
\t\$(".date-pick").datepicker({
\t\t\tshowOn: 'button',
\t\t\tbuttonImage: '../images/calendar.png',
\t\t\tbuttonImageOnly: true,
\t\t\tdateFormat: 'yy-mm-dd',
\t\t\tconstrainInput: false,
\t\t\tchangeMonth: true,
\t\t\tchangeYear: true
\t\t});

\t\$(".datetime-pick").datepicker({
\t\tshowOn: 'button',
\t\tbuttonImage: '../images/calendar.png',
\t\tbuttonImageOnly: true,
\t\tdateFormat: 'yy-mm-dd 00:00:00',
\t\tconstrainInput: false,
\t\tchangeMonth: true,
\t\tchangeYear: true
\t\t});

\t//\$('.resizable').resizable(); // Make resizable everything that claims to be resizable !
\t\$('.caselog_header').click( function () { \$(this).toggleClass('open').next('.caselog_entry').toggle(); });
//.........这里部分代码省略.........
开发者ID:kira8565,项目名称:ITOP203-ZHCN,代码行数:101,代码来源:portalwebpage.class.inc.php

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


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