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


PHP MetaModel::Init_AddAttribute方法代码示例

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


在下文中一共展示了MetaModel::Init_AddAttribute方法的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" => "gui", "key_type" => "autoincrement", "name_attcode" => "user_id", "state_attcode" => "", "reconc_keys" => array(), "db_table" => "priv_app_dashboards", "db_key_field" => "id", "db_finalclass_field" => "");
     MetaModel::Init_Params($aParams);
     MetaModel::Init_AddAttribute(new AttributeExternalKey("user_id", array("targetclass" => "User", "allowed_values" => null, "sql" => "user_id", "is_null_allowed" => false, "on_target_delete" => DEL_AUTO, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeString("menu_code", array("allowed_values" => null, "sql" => "menu_code", "default_value" => null, "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeText("contents", array("allowed_values" => null, "sql" => "contents", "default_value" => null, "is_null_allowed" => false, "depends_on" => array())));
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:8,代码来源:user.dashboard.class.inc.php

示例3: Init

 public static function Init()
 {
     $aParams = array("category" => "core/cmdb", "key_type" => "autoincrement", "name_attcode" => "date", "state_attcode" => "", "reconc_keys" => array(), "db_table" => "priv_change", "db_key_field" => "id", "db_finalclass_field" => "", 'indexes' => array(array('origin')));
     MetaModel::Init_Params($aParams);
     //MetaModel::Init_InheritAttributes();
     MetaModel::Init_AddAttribute(new AttributeDateTime("date", array("allowed_values" => null, "sql" => "date", "default_value" => "", "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeString("userinfo", array("allowed_values" => null, "sql" => "userinfo", "default_value" => null, "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeEnum("origin", array("allowed_values" => new ValueSetEnum('interactive,csv-interactive,csv-import.php,webservice-soap,webservice-rest,synchro-data-source,email-processing,custom-extension'), "sql" => "origin", "default_value" => "interactive", "is_null_allowed" => true, "depends_on" => array())));
 }
开发者ID:kira8565,项目名称:ITOP203-ZHCN,代码行数:9,代码来源:cmdbchange.class.inc.php

示例4: 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' => 'mobilephone', 'db_key_field' => 'id', 'db_finalclass_field' => '', 'icon' => utils::GetAbsoluteUrlModulesRoot() . 'itop-endusers-devices/images/mobile-phone.png');
     MetaModel::Init_Params($aParams);
     MetaModel::Init_InheritAttributes();
     MetaModel::Init_AddAttribute(new AttributeString("imei", array("allowed_values" => null, "sql" => 'imei', "default_value" => '', "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false)));
     MetaModel::Init_AddAttribute(new AttributeString("hw_pin", array("allowed_values" => null, "sql" => 'hw_pin', "default_value" => '', "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false)));
     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 => 'phonenumber', 8 => 'imei', 9 => 'hw_pin', 10 => 'serialnumber', 11 => 'asset_number', 12 => 'move2production', 13 => 'purchase_date', 14 => 'end_of_warranty', 15 => 'description', 16 => 'contacts_list', 17 => 'documents_list', 18 => 'providercontracts_list', 19 => '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 => 'phonenumber', 8 => 'imei', 9 => 'hw_pin', 10 => 'serialnumber', 11 => 'asset_number', 12 => 'move2production', 13 => 'purchase_date', 14 => 'end_of_warranty'));
     MetaModel::Init_SetZListItems('list', array(0 => 'org_id', 1 => 'status', 2 => 'location_id', 3 => 'brand_id', 4 => 'model_id', 5 => 'phonenumber'));
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:11,代码来源:model.itop-endusers-devices.php

示例5: Init

 public static function Init()
 {
     $aParams = array("category" => "cloud", "key_type" => "autoincrement", "name_attcode" => "name", "state_attcode" => "", "reconc_keys" => array(), "db_table" => "priv_db_properties", "db_key_field" => "id", "db_finalclass_field" => "");
     MetaModel::Init_Params($aParams);
     //MetaModel::Init_InheritAttributes();
     MetaModel::Init_AddAttribute(new AttributeString("name", array("allowed_values" => null, "sql" => "name", "default_value" => null, "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeString("description", array("allowed_values" => null, "sql" => "description", "default_value" => null, "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeString("value", array("allowed_values" => null, "sql" => "value", "default_value" => null, "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeDateTime("change_date", array("allowed_values" => null, "sql" => "change_date", "default_value" => "", "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeString("change_comment", array("allowed_values" => null, "sql" => "change_comment", "default_value" => null, "is_null_allowed" => true, "depends_on" => array())));
 }
开发者ID:kira8565,项目名称:ITOP203-ZHCN,代码行数:11,代码来源:dbproperty.class.inc.php

示例6: Init

 public static function Init()
 {
     $aParams = array("category" => "addon/userrights", "key_type" => "autoincrement", "name_attcode" => "", "state_attcode" => "", "reconc_keys" => array(), "db_table" => "priv_ur_matrixattributes", "db_key_field" => "id", "db_finalclass_field" => "");
     MetaModel::Init_Params($aParams);
     //MetaModel::Init_InheritAttributes();
     MetaModel::Init_AddAttribute(new AttributeExternalKey("userid", array("targetclass" => "User", "jointype" => "", "allowed_values" => null, "sql" => "userid", "is_null_allowed" => false, "on_target_delete" => DEL_MANUAL, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeExternalField("login", array("allowed_values" => null, "extkey_attcode" => 'userid', "target_attcode" => "login")));
     MetaModel::Init_AddAttribute(new AttributeString("class", array("allowed_values" => null, "sql" => "class", "default_value" => null, "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeString("attcode", array("allowed_values" => null, "sql" => "attcode", "default_value" => null, "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeString("action", array("allowed_values" => null, "sql" => "action", "default_value" => "", "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeEnum("permission", array("allowed_values" => new ValueSetEnum('yes,no'), "sql" => "permission", "default_value" => "yes", "is_null_allowed" => false, "depends_on" => array())));
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:12,代码来源:userrightsmatrix.class.inc.php

示例7: Init

 public static function Init()
 {
     $aParams = array("category" => 'core/cmdb', "key_type" => 'autoincrement', "name_attcode" => array('created'), "state_attcode" => '', "reconc_keys" => array(), "db_table" => 'priv_bulk_export_result', "db_key_field" => 'id', "db_finalclass_field" => '', "display_template" => '');
     MetaModel::Init_Params($aParams);
     MetaModel::Init_AddAttribute(new AttributeDateTime("created", array("allowed_values" => null, "sql" => "created", "default_value" => "", "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeInteger("user_id", array("allowed_values" => null, "sql" => "user_id", "default_value" => 0, "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeInteger("chunk_size", array("allowed_values" => null, "sql" => "chunk_size", "default_value" => 0, "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeString("format", array("allowed_values" => null, "sql" => "format", "default_value" => '', "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeString("temp_file_path", array("allowed_values" => null, "sql" => "temp_file_path", "default_value" => '', "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeLongText("search", array("allowed_values" => null, "sql" => "search", "default_value" => '', "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeLongText("status_info", array("allowed_values" => null, "sql" => "status_info", "default_value" => '', "is_null_allowed" => false, "depends_on" => array())));
 }
开发者ID:henryavila,项目名称:itop,代码行数:12,代码来源:bulkexport.class.inc.php

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

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

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

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

示例12: Init

 public static function Init()
 {
     $aParams = array("category" => "core/cmdb", "key_type" => "autoincrement", "name_attcode" => "class_name", "state_attcode" => "", "reconc_keys" => array(), "db_table" => "priv_backgroundtask", "db_key_field" => "id", "db_finalclass_field" => "", "display_template" => "");
     MetaModel::Init_Params($aParams);
     MetaModel::Init_AddAttribute(new AttributeString("class_name", array("allowed_values" => null, "sql" => "class_name", "default_value" => null, "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeDateTime("first_run_date", array("allowed_values" => null, "sql" => "first_run_date", "default_value" => "", "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeDateTime("latest_run_date", array("allowed_values" => null, "sql" => "latest_run_date", "default_value" => "", "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeDateTime("next_run_date", array("allowed_values" => null, "sql" => "next_run_date", "default_value" => "", "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeInteger("total_exec_count", array("allowed_values" => null, "sql" => "total_exec_count", "default_value" => "0", "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeDecimal("latest_run_duration", array("allowed_values" => null, "sql" => "latest_run_duration", "digits" => 8, "decimals" => 3, "default_value" => "0", "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeDecimal("min_run_duration", array("allowed_values" => null, "sql" => "min_run_duration", "digits" => 8, "decimals" => 3, "default_value" => "0", "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeDecimal("max_run_duration", array("allowed_values" => null, "sql" => "max_run_duration", "digits" => 8, "decimals" => 3, "default_value" => "0", "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeDecimal("average_run_duration", array("allowed_values" => null, "sql" => "average_run_duration", "digits" => 8, "decimals" => 3, "default_value" => "0", "is_null_allowed" => true, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeBoolean("running", array("allowed_values" => null, "sql" => "running", "default_value" => false, "is_null_allowed" => false, "depends_on" => array())));
     MetaModel::Init_AddAttribute(new AttributeEnum("status", array("allowed_values" => new ValueSetEnum('active,paused'), "sql" => "status", "default_value" => 'active', "is_null_allowed" => false, "depends_on" => array())));
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:16,代码来源:backgroundtask.class.inc.php

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

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

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


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