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


PHP ObjectLock::getSearchOptionsToAdd方法代码示例

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


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

示例1: getSearchOptions

 function getSearchOptions()
 {
     $tab = array();
     $tab['common'] = __('Characteristics');
     $tab[1]['table'] = $this->getTable();
     $tab[1]['field'] = 'name';
     $tab[1]['name'] = __('Surname');
     $tab[1]['datatype'] = 'itemlink';
     $tab[1]['massiveaction'] = false;
     $tab[11]['table'] = $this->getTable();
     $tab[11]['field'] = 'firstname';
     $tab[11]['name'] = __('First name');
     $tab[11]['datatype'] = 'string';
     $tab[2]['table'] = $this->getTable();
     $tab[2]['field'] = 'id';
     $tab[2]['name'] = __('ID');
     $tab[2]['massiveaction'] = false;
     $tab[2]['datatype'] = 'number';
     $tab[3]['table'] = $this->getTable();
     $tab[3]['field'] = 'phone';
     $tab[3]['name'] = __('Phone');
     $tab[3]['datatype'] = 'string';
     $tab[4]['table'] = $this->getTable();
     $tab[4]['field'] = 'phone2';
     $tab[4]['name'] = __('Phone 2');
     $tab[4]['datatype'] = 'string';
     $tab[10]['table'] = $this->getTable();
     $tab[10]['field'] = 'mobile';
     $tab[10]['name'] = __('Mobile phone');
     $tab[10]['datatype'] = 'string';
     $tab[5]['table'] = $this->getTable();
     $tab[5]['field'] = 'fax';
     $tab[5]['name'] = __('Fax');
     $tab[5]['datatype'] = 'string';
     $tab[6]['table'] = $this->getTable();
     $tab[6]['field'] = 'email';
     $tab[6]['name'] = _n('Email', 'Emails', 1);
     $tab[6]['datatype'] = 'email';
     $tab[82]['table'] = $this->getTable();
     $tab[82]['field'] = 'address';
     $tab[82]['name'] = __('Address');
     $tab[83]['datatype'] = 'text';
     $tab[84]['table'] = $this->getTable();
     $tab[84]['field'] = 'town';
     $tab[84]['name'] = __('City');
     $tab[84]['datatype'] = 'string';
     $tab[83]['table'] = $this->getTable();
     $tab[83]['field'] = 'postcode';
     $tab[83]['name'] = __('Postal code');
     $tab[83]['datatype'] = 'string';
     $tab[85]['table'] = $this->getTable();
     $tab[85]['field'] = 'state';
     $tab[85]['name'] = _x('location', 'State');
     $tab[85]['datatype'] = 'string';
     $tab[87]['table'] = $this->getTable();
     $tab[87]['field'] = 'country';
     $tab[87]['name'] = __('Country');
     $tab[87]['datatype'] = 'string';
     $tab[9]['table'] = 'glpi_contacttypes';
     $tab[9]['field'] = 'name';
     $tab[9]['name'] = __('Type');
     $tab[9]['datatype'] = 'dropdown';
     $tab[81]['table'] = 'glpi_usertitles';
     $tab[81]['field'] = 'name';
     $tab[81]['name'] = _x('person', 'Title');
     $tab[81]['datatype'] = 'dropdown';
     $tab[8]['table'] = 'glpi_suppliers';
     $tab[8]['field'] = 'name';
     $tab[8]['name'] = _n('Associated supplier', 'Associated suppliers', Session::getPluralNumber());
     $tab[8]['forcegroupby'] = true;
     $tab[8]['datatype'] = 'itemlink';
     $tab[8]['joinparams'] = array('beforejoin' => array('table' => 'glpi_contacts_suppliers', 'joinparams' => array('jointype' => 'child')));
     $tab[16]['table'] = $this->getTable();
     $tab[16]['field'] = 'comment';
     $tab[16]['name'] = __('Comments');
     $tab[16]['datatype'] = 'text';
     $tab[80]['table'] = 'glpi_entities';
     $tab[80]['field'] = 'completename';
     $tab[80]['name'] = __('Entity');
     $tab[80]['massiveaction'] = false;
     $tab[80]['datatype'] = 'dropdown';
     $tab[86]['table'] = $this->getTable();
     $tab[86]['field'] = 'is_recursive';
     $tab[86]['name'] = __('Child entities');
     $tab[86]['datatype'] = 'bool';
     // add objectlock search options
     $tab += ObjectLock::getSearchOptionsToAdd(get_class($this));
     $tab += Notepad::getSearchOptionsToAdd();
     return $tab;
 }
开发者ID:pvasener,项目名称:glpi,代码行数:90,代码来源:contact.class.php

示例2: getSearchOptions

 function getSearchOptions()
 {
     $tab = array();
     $tab['common'] = __('Characteristics');
     $tab[1]['table'] = $this->getTable();
     $tab[1]['field'] = 'name';
     $tab[1]['name'] = __('Name');
     $tab[1]['datatype'] = 'itemlink';
     $tab[1]['massiveaction'] = false;
     $tab[2]['table'] = $this->getTable();
     $tab[2]['field'] = 'id';
     $tab[2]['name'] = __('ID');
     $tab[2]['massiveaction'] = false;
     $tab[2]['datatype'] = 'number';
     $tab += Location::getSearchOptionsToAdd();
     $tab[4]['table'] = 'glpi_printertypes';
     $tab[4]['field'] = 'name';
     $tab[4]['name'] = __('Type');
     $tab[4]['datatype'] = 'dropdown';
     $tab[40]['table'] = 'glpi_printermodels';
     $tab[40]['field'] = 'name';
     $tab[40]['name'] = __('Model');
     $tab[40]['datatype'] = 'dropdown';
     $tab[31]['table'] = 'glpi_states';
     $tab[31]['field'] = 'completename';
     $tab[31]['name'] = __('Status');
     $tab[31]['datatype'] = 'dropdown';
     $tab[31]['condition'] = "`is_visible_printer`";
     $tab[5]['table'] = $this->getTable();
     $tab[5]['field'] = 'serial';
     $tab[5]['name'] = __('Serial number');
     $tab[5]['datatype'] = 'string';
     $tab[6]['table'] = $this->getTable();
     $tab[6]['field'] = 'otherserial';
     $tab[6]['name'] = __('Inventory number');
     $tab[6]['datatype'] = 'string';
     $tab[7]['table'] = $this->getTable();
     $tab[7]['field'] = 'contact';
     $tab[7]['name'] = __('Alternate username');
     $tab[7]['datatype'] = 'string';
     $tab[8]['table'] = $this->getTable();
     $tab[8]['field'] = 'contact_num';
     $tab[8]['name'] = __('Alternate username number');
     $tab[8]['datatype'] = 'string';
     $tab[70]['table'] = 'glpi_users';
     $tab[70]['field'] = 'name';
     $tab[70]['name'] = __('User');
     $tab[70]['datatype'] = 'dropdown';
     $tab[70]['right'] = 'all';
     $tab[71]['table'] = 'glpi_groups';
     $tab[71]['field'] = 'completename';
     $tab[71]['name'] = __('Group');
     $tab[71]['condition'] = '`is_itemgroup`';
     $tab[71]['datatype'] = 'dropdown';
     $tab[19]['table'] = $this->getTable();
     $tab[19]['field'] = 'date_mod';
     $tab[19]['name'] = __('Last update');
     $tab[19]['datatype'] = 'datetime';
     $tab[19]['massiveaction'] = false;
     $tab[16]['table'] = $this->getTable();
     $tab[16]['field'] = 'comment';
     $tab[16]['name'] = __('Comments');
     $tab[16]['datatype'] = 'text';
     $tab[42]['table'] = $this->getTable();
     $tab[42]['field'] = 'have_serial';
     $tab[42]['name'] = __('Serial');
     $tab[42]['datatype'] = 'bool';
     $tab[43]['table'] = $this->getTable();
     $tab[43]['field'] = 'have_parallel';
     $tab[43]['name'] = __('Parallel');
     $tab[43]['datatype'] = 'bool';
     $tab[44]['table'] = $this->getTable();
     $tab[44]['field'] = 'have_usb';
     $tab[44]['name'] = __('USB');
     $tab[44]['datatype'] = 'bool';
     $tab[45]['table'] = $this->getTable();
     $tab[45]['field'] = 'have_ethernet';
     $tab[45]['name'] = __('Ethernet');
     $tab[45]['datatype'] = 'bool';
     $tab[46]['table'] = $this->getTable();
     $tab[46]['field'] = 'have_wifi';
     $tab[46]['name'] = __('Wifi');
     $tab[46]['datatype'] = 'bool';
     $tab[13]['table'] = $this->getTable();
     $tab[13]['field'] = 'memory_size';
     $tab[13]['name'] = __('Memory');
     $tab[13]['datatype'] = 'string';
     $tab[11]['table'] = $this->getTable();
     $tab[11]['field'] = 'init_pages_counter';
     $tab[11]['name'] = __('Initial page counter');
     $tab[11]['datatype'] = 'number';
     $tab[11]['nosearch'] = true;
     // only display and histo, no index
     $tab[12]['table'] = $this->getTable();
     $tab[12]['field'] = 'last_pages_counter';
     $tab[12]['name'] = __('Current counter of pages');
     $tab[12]['datatype'] = 'number';
     $tab[9]['table'] = 'glpi_printers';
     $tab[9]['field'] = '_virtual';
     $tab[9]['linkfield'] = '_virtual';
//.........这里部分代码省略.........
开发者ID:pvasener,项目名称:glpi,代码行数:101,代码来源:printer.class.php

示例3: getSearchOptions


//.........这里部分代码省略.........
     $tab[12]['datafields'][1] = 'begin_date';
     $tab[12]['datafields'][2] = 'duration';
     $tab[12]['searchunit'] = 'DAY';
     $tab[12]['delayunit'] = 'MONTH';
     $tab[12]['maybefuture'] = true;
     $tab[12]['massiveaction'] = false;
     $tab[13]['table'] = $this->getTable();
     $tab[13]['field'] = 'expire_notice';
     $tab[13]['name'] = __('Expiration date + notice');
     $tab[13]['datatype'] = 'date_delay';
     $tab[13]['datafields'][1] = 'begin_date';
     $tab[13]['datafields'][2] = 'duration';
     $tab[13]['datafields'][3] = 'notice';
     $tab[13]['searchunit'] = 'DAY';
     $tab[13]['delayunit'] = 'MONTH';
     $tab[13]['maybefuture'] = true;
     $tab[13]['massiveaction'] = false;
     $tab[16]['table'] = $this->getTable();
     $tab[16]['field'] = 'comment';
     $tab[16]['name'] = __('Comments');
     $tab[16]['datatype'] = 'text';
     $tab[80]['table'] = 'glpi_entities';
     $tab[80]['field'] = 'completename';
     $tab[80]['name'] = __('Entity');
     $tab[80]['massiveaction'] = false;
     $tab[80]['datatype'] = 'dropdown';
     $tab[59]['table'] = $this->getTable();
     $tab[59]['field'] = 'alert';
     $tab[59]['name'] = __('Email alarms');
     $tab[59]['datatype'] = 'specific';
     $tab[59]['searchtype'] = array('equals', 'notequals');
     $tab[86]['table'] = $this->getTable();
     $tab[86]['field'] = 'is_recursive';
     $tab[86]['name'] = __('Child entities');
     $tab[86]['datatype'] = 'bool';
     $tab[72]['table'] = 'glpi_contracts_items';
     $tab[72]['field'] = 'id';
     $tab[72]['name'] = _x('quantity', 'Number of items');
     $tab[72]['forcegroupby'] = true;
     $tab[72]['usehaving'] = true;
     $tab[72]['datatype'] = 'count';
     $tab[72]['massiveaction'] = false;
     $tab[72]['joinparams'] = array('jointype' => 'child');
     $tab[29]['table'] = 'glpi_suppliers';
     $tab[29]['field'] = 'name';
     $tab[29]['name'] = _n('Associated supplier', 'Associated suppliers', Session::getPluralNumber());
     $tab[29]['forcegroupby'] = true;
     $tab[29]['datatype'] = 'itemlink';
     $tab[29]['massiveaction'] = false;
     $tab[29]['joinparams'] = array('beforejoin' => array('table' => 'glpi_contracts_suppliers', 'joinparams' => array('jointype' => 'child')));
     // add objectlock search options
     $tab += ObjectLock::getSearchOptionsToAdd(get_class($this));
     $tab += Notepad::getSearchOptionsToAdd();
     $tab['cost'] = __('Cost');
     $tab[11]['table'] = 'glpi_contractcosts';
     $tab[11]['field'] = 'totalcost';
     $tab[11]['name'] = __('Total cost');
     $tab[11]['datatype'] = 'decimal';
     $tab[11]['forcegroupby'] = true;
     $tab[11]['usehaving'] = true;
     $tab[11]['massiveaction'] = false;
     $tab[11]['joinparams'] = array('jointype' => 'child');
     $tab[11]['computation'] = "(SUM(TABLE.`cost`) / COUNT(TABLE.`id`))\n                                       * COUNT(DISTINCT TABLE.`id`)";
     $tab[41]['table'] = 'glpi_contractcosts';
     $tab[41]['field'] = 'cost';
     $tab[41]['name'] = _n('Cost', 'Costs', Session::getPluralNumber());
     $tab[41]['datatype'] = 'decimal';
     $tab[41]['forcegroupby'] = true;
     $tab[41]['massiveaction'] = false;
     $tab[41]['joinparams'] = array('jointype' => 'child');
     $tab[42]['table'] = 'glpi_contractcosts';
     $tab[42]['field'] = 'begin_date';
     $tab[42]['name'] = sprintf(__('%1$s - %2$s'), __('Cost'), __('Begin date'));
     $tab[42]['datatype'] = 'date';
     $tab[42]['forcegroupby'] = true;
     $tab[42]['massiveaction'] = false;
     $tab[42]['joinparams'] = array('jointype' => 'child');
     $tab[43]['table'] = 'glpi_contractcosts';
     $tab[43]['field'] = 'end_date';
     $tab[43]['name'] = sprintf(__('%1$s - %2$s'), __('Cost'), __('End date'));
     $tab[43]['datatype'] = 'date';
     $tab[43]['forcegroupby'] = true;
     $tab[43]['massiveaction'] = false;
     $tab[43]['joinparams'] = array('jointype' => 'child');
     $tab[44]['table'] = 'glpi_contractcosts';
     $tab[44]['field'] = 'name';
     $tab[44]['name'] = sprintf(__('%1$s - %2$s'), __('Cost'), __('Name'));
     $tab[44]['forcegroupby'] = true;
     $tab[44]['massiveaction'] = false;
     $tab[44]['joinparams'] = array('jointype' => 'child');
     $tab[44]['datatype'] = 'dropdown';
     $tab[45]['table'] = 'glpi_budgets';
     $tab[45]['field'] = 'name';
     $tab[45]['name'] = sprintf(__('%1$s - %2$s'), __('Cost'), __('Budget'));
     $tab[45]['datatype'] = 'dropdown';
     $tab[45]['forcegroupby'] = true;
     $tab[45]['massiveaction'] = false;
     $tab[45]['joinparams'] = array('beforejoin' => array('table' => 'glpi_contractcosts', 'joinparams' => array('jointype' => 'child')));
     return $tab;
 }
开发者ID:glpi-project,项目名称:glpi,代码行数:101,代码来源:contract.class.php

示例4: getSearchOptionsMain


//.........这里部分代码省略.........
     $tab[21]['field'] = 'content';
     $tab[21]['name'] = __('Description');
     $tab[21]['massiveaction'] = false;
     $tab[21]['datatype'] = 'text';
     if ($this->getType() == 'Ticket' && $CFG_GLPI["use_rich_text"]) {
         $tab[21]['htmltext'] = true;
     }
     $tab[2]['table'] = $this->getTable();
     $tab[2]['field'] = 'id';
     $tab[2]['name'] = __('ID');
     $tab[2]['massiveaction'] = false;
     $tab[2]['datatype'] = 'number';
     $tab[12]['table'] = $this->getTable();
     $tab[12]['field'] = 'status';
     $tab[12]['name'] = __('Status');
     $tab[12]['searchtype'] = 'equals';
     $tab[12]['datatype'] = 'specific';
     $tab[10]['table'] = $this->getTable();
     $tab[10]['field'] = 'urgency';
     $tab[10]['name'] = __('Urgency');
     $tab[10]['searchtype'] = 'equals';
     $tab[10]['datatype'] = 'specific';
     $tab[11]['table'] = $this->getTable();
     $tab[11]['field'] = 'impact';
     $tab[11]['name'] = __('Impact');
     $tab[11]['searchtype'] = 'equals';
     $tab[11]['datatype'] = 'specific';
     $tab[3]['table'] = $this->getTable();
     $tab[3]['field'] = 'priority';
     $tab[3]['name'] = __('Priority');
     $tab[3]['searchtype'] = 'equals';
     $tab[3]['datatype'] = 'specific';
     $tab[15]['table'] = $this->getTable();
     $tab[15]['field'] = 'date';
     $tab[15]['name'] = __('Opening date');
     $tab[15]['datatype'] = 'datetime';
     $tab[15]['massiveaction'] = false;
     $tab[16]['table'] = $this->getTable();
     $tab[16]['field'] = 'closedate';
     $tab[16]['name'] = __('Closing date');
     $tab[16]['datatype'] = 'datetime';
     $tab[16]['massiveaction'] = false;
     $tab[18]['table'] = $this->getTable();
     $tab[18]['field'] = 'due_date';
     $tab[18]['name'] = __('Time to resolve');
     $tab[18]['datatype'] = 'datetime';
     $tab[18]['maybefuture'] = true;
     $tab[18]['massiveaction'] = false;
     $tab[18]['additionalfields'] = array('status');
     $tab[151]['table'] = $this->getTable();
     $tab[151]['field'] = 'due_date';
     $tab[151]['name'] = __('Time to resolve + Progress');
     $tab[151]['massiveaction'] = false;
     $tab[151]['nosearch'] = true;
     $tab[151]['additionalfields'] = array('status');
     $tab[82]['table'] = $this->getTable();
     $tab[82]['field'] = 'is_late';
     $tab[82]['name'] = __('Time to resolve exceedeed');
     $tab[82]['datatype'] = 'bool';
     $tab[82]['massiveaction'] = false;
     $tab[82]['computation'] = "IF(TABLE.`due_date` IS NOT NULL\n                                            AND TABLE.`status` <> " . self::WAITING . "\n                                            AND (TABLE.`solvedate` > TABLE.`due_date`\n                                                 OR (TABLE.`solvedate` IS NULL\n                                                      AND TABLE.`due_date` < NOW())),\n                                            1, 0)";
     $tab[17]['table'] = $this->getTable();
     $tab[17]['field'] = 'solvedate';
     $tab[17]['name'] = __('Resolution date');
     $tab[17]['datatype'] = 'datetime';
     $tab[17]['massiveaction'] = false;
     $tab[19]['table'] = $this->getTable();
     $tab[19]['field'] = 'date_mod';
     $tab[19]['name'] = __('Last update');
     $tab[19]['datatype'] = 'datetime';
     $tab[19]['massiveaction'] = false;
     $tab[7]['table'] = 'glpi_itilcategories';
     $tab[7]['field'] = 'completename';
     $tab[7]['name'] = __('Category');
     $tab[7]['datatype'] = 'dropdown';
     if (!Session::isCron() && isset($_SESSION['glpiactiveprofile']['interface']) && $_SESSION['glpiactiveprofile']['interface'] == 'helpdesk') {
         $tab[7]['condition'] = "`is_helpdeskvisible`";
     }
     $tab[80]['table'] = 'glpi_entities';
     $tab[80]['field'] = 'completename';
     $tab[80]['name'] = __('Entity');
     $tab[80]['massiveaction'] = false;
     $tab[80]['datatype'] = 'dropdown';
     $tab[45]['table'] = $this->getTable();
     $tab[45]['field'] = 'actiontime';
     $tab[45]['name'] = __('Total duration');
     $tab[45]['datatype'] = 'timestamp';
     $tab[45]['massiveaction'] = false;
     $tab[45]['nosearch'] = true;
     $tab[64]['table'] = 'glpi_users';
     $tab[64]['field'] = 'name';
     $tab[64]['linkfield'] = 'users_id_lastupdater';
     $tab[64]['name'] = __('Last edit by');
     $tab[64]['massiveaction'] = false;
     $tab[64]['datatype'] = 'dropdown';
     $tab[64]['right'] = 'all';
     // add objectlock search options
     $tab += ObjectLock::getSearchOptionsToAdd(get_class($this));
     return $tab;
 }
开发者ID:glpi-project,项目名称:glpi,代码行数:101,代码来源:commonitilobject.class.php

示例5: getSearchOptions

 function getSearchOptions()
 {
     $tab = array();
     $tab[1]['table'] = $this->getTable();
     $tab[1]['field'] = 'name';
     $tab[1]['name'] = __('Name');
     $tab[1]['datatype'] = 'itemlink';
     $tab[1]['massiveaction'] = false;
     $tab[2]['table'] = $this->getTable();
     $tab[2]['field'] = 'id';
     $tab[2]['name'] = __('ID');
     $tab[2]['massiveaction'] = false;
     $tab[2]['datatype'] = 'number';
     $tab[19]['table'] = $this->getTable();
     $tab[19]['field'] = 'date_mod';
     $tab[19]['name'] = __('Last update');
     $tab[19]['datatype'] = 'datetime';
     $tab[19]['massiveaction'] = false;
     $tab[121]['table'] = $this->getTable();
     $tab[121]['field'] = 'date_creation';
     $tab[121]['name'] = __('Creation date');
     $tab[121]['datatype'] = 'datetime';
     $tab[121]['massiveaction'] = false;
     $tab[5]['table'] = $this->getTable();
     $tab[5]['field'] = 'begin_date';
     $tab[5]['name'] = __('Start date');
     $tab[5]['datatype'] = 'date';
     $tab[3]['table'] = $this->getTable();
     $tab[3]['field'] = 'end_date';
     $tab[3]['name'] = __('End date');
     $tab[3]['datatype'] = 'date';
     $tab[4]['table'] = $this->getTable();
     $tab[4]['field'] = 'value';
     $tab[4]['name'] = _x('price', 'Value');
     $tab[4]['datatype'] = 'decimal';
     $tab[16]['table'] = $this->getTable();
     $tab[16]['field'] = 'comment';
     $tab[16]['name'] = __('Comments');
     $tab[16]['datatype'] = 'text';
     $tab[80]['table'] = 'glpi_entities';
     $tab[80]['field'] = 'completename';
     $tab[80]['name'] = __('Entity');
     $tab[80]['massiveaction'] = false;
     $tab[80]['datatype'] = 'dropdown';
     $tab[86]['table'] = $this->getTable();
     $tab[86]['field'] = 'is_recursive';
     $tab[86]['name'] = __('Child entities');
     $tab[86]['datatype'] = 'bool';
     // add objectlock search options
     $tab += ObjectLock::getSearchOptionsToAdd(get_class($this));
     $tab += Notepad::getSearchOptionsToAdd();
     return $tab;
 }
开发者ID:korial29,项目名称:glpi,代码行数:53,代码来源:budget.class.php

示例6: getSearchOptions

 function getSearchOptions()
 {
     // Only use for History (not by search Engine)
     $tab = array();
     $tab['common'] = __('Characteristics');
     $tab[1]['table'] = $this->getTable();
     $tab[1]['field'] = 'name';
     $tab[1]['name'] = __('Name');
     $tab[1]['datatype'] = 'itemlink';
     $tab[1]['massiveaction'] = false;
     $tab[1]['forcegroupby'] = true;
     $tab[1]['massiveaction'] = false;
     $tab[2]['table'] = $this->getTable();
     $tab[2]['field'] = 'id';
     $tab[2]['name'] = __('ID');
     $tab[2]['massiveaction'] = false;
     $tab[2]['datatype'] = 'number';
     $tab[2]['forcegroupby'] = true;
     $tab[2]['massiveaction'] = false;
     $tab += Location::getSearchOptionsToAdd();
     $tab[3]['table'] = $this->getTable();
     $tab[3]['field'] = 'serial';
     $tab[3]['name'] = __('Serial number');
     $tab[3]['datatype'] = 'string';
     $tab[4]['table'] = $this->getTable();
     $tab[4]['field'] = 'number';
     $tab[4]['name'] = _x('quantity', 'Number');
     $tab[4]['datatype'] = 'number';
     $tab[4]['max'] = 100;
     $tab[4]['toadd'] = array(-1 => __('Unlimited'));
     $tab[5]['table'] = 'glpi_softwarelicensetypes';
     $tab[5]['field'] = 'name';
     $tab[5]['name'] = __('Type');
     $tab[5]['datatype'] = 'dropdown';
     $tab[6]['table'] = 'glpi_softwareversions';
     $tab[6]['field'] = 'name';
     $tab[6]['linkfield'] = 'softwareversions_id_buy';
     $tab[6]['name'] = __('Purchase version');
     $tab[6]['datatype'] = 'dropdown';
     $tab[6]['displaywith'] = array('states_id');
     $tab[7]['table'] = 'glpi_softwareversions';
     $tab[7]['field'] = 'name';
     $tab[7]['linkfield'] = 'softwareversions_id_use';
     $tab[7]['name'] = __('Version in use');
     $tab[7]['datatype'] = 'dropdown';
     $tab[7]['displaywith'] = array('states_id');
     $tab[8]['table'] = $this->getTable();
     $tab[8]['field'] = 'expire';
     $tab[8]['name'] = __('Expiration');
     $tab[8]['datatype'] = 'date';
     $tab[9]['table'] = $this->getTable();
     $tab[9]['field'] = 'is_valid';
     $tab[9]['name'] = __('Valid');
     $tab[9]['datatype'] = 'bool';
     $tab[10]['table'] = 'glpi_softwares';
     $tab[10]['field'] = 'name';
     $tab[10]['name'] = __('Software');
     $tab[10]['datatype'] = 'itemlink';
     $tab[16]['table'] = $this->getTable();
     $tab[16]['field'] = 'comment';
     $tab[16]['name'] = __('Comments');
     $tab[16]['datatype'] = 'text';
     $tab[24]['table'] = 'glpi_users';
     $tab[24]['field'] = 'name';
     $tab[24]['linkfield'] = 'users_id_tech';
     $tab[24]['name'] = __('Technician in charge of the hardware');
     $tab[24]['datatype'] = 'dropdown';
     $tab[24]['right'] = 'own_ticket';
     $tab[31]['table'] = 'glpi_states';
     $tab[31]['field'] = 'completename';
     $tab[31]['name'] = __('Status');
     $tab[31]['datatype'] = 'dropdown';
     $tab[31]['condition'] = "`is_visible_softwarelicense`";
     $tab[49]['table'] = 'glpi_groups';
     $tab[49]['field'] = 'completename';
     $tab[49]['linkfield'] = 'groups_id_tech';
     $tab[49]['name'] = __('Group in charge of the hardware');
     $tab[49]['condition'] = '`is_assign`';
     $tab[49]['datatype'] = 'dropdown';
     $tab[70]['table'] = 'glpi_users';
     $tab[70]['field'] = 'name';
     $tab[70]['name'] = __('User');
     $tab[70]['datatype'] = 'dropdown';
     $tab[70]['right'] = 'all';
     $tab[71]['table'] = 'glpi_groups';
     $tab[71]['field'] = 'completename';
     $tab[71]['name'] = __('Group');
     $tab[71]['condition'] = '`is_itemgroup`';
     $tab[71]['datatype'] = 'dropdown';
     $tab[80]['table'] = 'glpi_entities';
     $tab[80]['field'] = 'completename';
     $tab[80]['name'] = __('Entity');
     $tab[80]['datatype'] = 'dropdown';
     $tab[86]['table'] = $this->getTable();
     $tab[86]['field'] = 'is_recursive';
     $tab[86]['name'] = __('Child entities');
     $tab[86]['datatype'] = 'bool';
     $tab[162]['table'] = $this->getTable();
     $tab[162]['field'] = 'otherserial';
     $tab[162]['name'] = __('Inventory number');
//.........这里部分代码省略.........
开发者ID:glpi-project,项目名称:glpi,代码行数:101,代码来源:softwarelicense.class.php

示例7: getSearchOptions

 /**
  * Get search function for the class
  *
  * @return array of search option
  **/
 function getSearchOptions()
 {
     $tab = array();
     $tab['common'] = __('Characteristics');
     $tab[1]['table'] = $this->getTable();
     $tab[1]['field'] = 'completename';
     $tab[1]['name'] = __('Complete name');
     $tab[1]['datatype'] = 'itemlink';
     $tab[1]['massiveaction'] = false;
     $tab[2]['table'] = $this->getTable();
     $tab[2]['field'] = 'id';
     $tab[2]['name'] = __('ID');
     $tab[2]['massiveaction'] = false;
     $tab[2]['datatype'] = 'number';
     $tab[14]['table'] = $this->getTable();
     $tab[14]['field'] = 'name';
     $tab[14]['name'] = __('Name');
     $tab[14]['datatype'] = 'itemlink';
     $tab[13]['table'] = $this->getTable();
     $tab[13]['field'] = 'completename';
     $tab[13]['name'] = __('Father');
     $tab[13]['datatype'] = 'dropdown';
     $tab[13]['massiveaction'] = false;
     // Add virtual condition to relink table
     $tab[13]['joinparams'] = array('condition' => "AND 1=1");
     $tab[16]['table'] = $this->getTable();
     $tab[16]['field'] = 'comment';
     $tab[16]['name'] = __('Comments');
     $tab[16]['datatype'] = 'text';
     if ($this->isEntityAssign()) {
         $tab[80]['table'] = 'glpi_entities';
         $tab[80]['field'] = 'completename';
         $tab[80]['name'] = __('Entity');
         $tab[80]['massiveaction'] = false;
         $tab[80]['datatype'] = 'dropdown';
     }
     if ($this->maybeRecursive()) {
         $tab[86]['table'] = $this->getTable();
         $tab[86]['field'] = 'is_recursive';
         $tab[86]['name'] = __('Child entities');
         $tab[86]['datatype'] = 'bool';
     }
     if ($this->isField('date_mod')) {
         $tab[19]['table'] = $this->getTable();
         $tab[19]['field'] = 'date_mod';
         $tab[19]['name'] = __('Last update');
         $tab[19]['datatype'] = 'datetime';
         $tab[19]['massiveaction'] = false;
     }
     if ($this->isField('date_creation')) {
         $tab[121]['table'] = $this->getTable();
         $tab[121]['field'] = 'date_creation';
         $tab[121]['name'] = __('Creation date');
         $tab[121]['datatype'] = 'datetime';
         $tab[121]['massiveaction'] = false;
     }
     // add objectlock search options
     $tab += ObjectLock::getSearchOptionsToAdd(get_class($this));
     return $tab;
 }
开发者ID:korial29,项目名称:glpi,代码行数:65,代码来源:commontreedropdown.class.php

示例8: getSearchOptions

 function getSearchOptions()
 {
     $tab = array();
     $tab['common'] = __('Characteristics');
     $tab[1]['table'] = $this->getTable();
     $tab[1]['field'] = 'name';
     $tab[1]['name'] = __('Name');
     $tab[1]['datatype'] = 'itemlink';
     $tab[1]['massiveaction'] = false;
     $tab[2]['table'] = $this->getTable();
     $tab[2]['field'] = 'id';
     $tab[2]['name'] = __('ID');
     $tab[2]['massiveaction'] = false;
     $tab[2]['datatype'] = 'number';
     $tab += Location::getSearchOptionsToAdd();
     $tab[4]['table'] = 'glpi_monitortypes';
     $tab[4]['field'] = 'name';
     $tab[4]['name'] = __('Type');
     $tab[4]['datatype'] = 'dropdown';
     $tab[40]['table'] = 'glpi_monitormodels';
     $tab[40]['field'] = 'name';
     $tab[40]['name'] = __('Model');
     $tab[40]['datatype'] = 'dropdown';
     $tab[31]['table'] = 'glpi_states';
     $tab[31]['field'] = 'completename';
     $tab[31]['name'] = __('Status');
     $tab[31]['datatype'] = 'dropdown';
     $tab[31]['condition'] = "`is_visible_monitor`";
     $tab[5]['table'] = $this->getTable();
     $tab[5]['field'] = 'serial';
     $tab[5]['name'] = __('Serial number');
     $tab[5]['datatype'] = 'string';
     $tab[6]['table'] = $this->getTable();
     $tab[6]['field'] = 'otherserial';
     $tab[6]['name'] = __('Inventory number');
     $tab[6]['datatype'] = 'string';
     $tab[7]['table'] = $this->getTable();
     $tab[7]['field'] = 'contact';
     $tab[7]['name'] = __('Alternate username');
     $tab[7]['datatype'] = 'string';
     $tab[8]['table'] = $this->getTable();
     $tab[8]['field'] = 'contact_num';
     $tab[8]['name'] = __('Alternate username number');
     $tab[8]['datatype'] = 'string';
     $tab[70]['table'] = 'glpi_users';
     $tab[70]['field'] = 'name';
     $tab[70]['name'] = __('User');
     $tab[70]['datatype'] = 'dropdown';
     $tab[70]['right'] = 'all';
     $tab[71]['table'] = 'glpi_groups';
     $tab[71]['field'] = 'completename';
     $tab[71]['name'] = __('Group');
     $tab[71]['condition'] = '`is_itemgroup`';
     $tab[71]['datatype'] = 'dropdown';
     $tab[19]['table'] = $this->getTable();
     $tab[19]['field'] = 'date_mod';
     $tab[19]['name'] = __('Last update');
     $tab[19]['datatype'] = 'datetime';
     $tab[19]['massiveaction'] = false;
     $tab[16]['table'] = $this->getTable();
     $tab[16]['field'] = 'comment';
     $tab[16]['name'] = __('Comments');
     $tab[16]['datatype'] = 'text';
     $tab[11]['table'] = $this->getTable();
     $tab[11]['field'] = 'size';
     $tab[11]['name'] = __('Size');
     $tab[11]['datatype'] = 'number';
     $tab[41]['table'] = $this->getTable();
     $tab[41]['field'] = 'have_micro';
     $tab[41]['name'] = __('Microphone');
     $tab[41]['datatype'] = 'bool';
     $tab[42]['table'] = $this->getTable();
     $tab[42]['field'] = 'have_speaker';
     $tab[42]['name'] = __('Speakers');
     $tab[42]['datatype'] = 'bool';
     $tab[43]['table'] = $this->getTable();
     $tab[43]['field'] = 'have_subd';
     $tab[43]['name'] = __('Sub-D');
     $tab[43]['datatype'] = 'bool';
     $tab[44]['table'] = $this->getTable();
     $tab[44]['field'] = 'have_bnc';
     $tab[44]['name'] = 'BNC';
     $tab[44]['datatype'] = 'bool';
     $tab[45]['table'] = $this->getTable();
     $tab[45]['field'] = 'have_dvi';
     $tab[45]['name'] = __('DVI');
     $tab[45]['datatype'] = 'bool';
     $tab[46]['table'] = $this->getTable();
     $tab[46]['field'] = 'have_pivot';
     $tab[46]['name'] = __('Pivot');
     $tab[46]['datatype'] = 'bool';
     $tab[47]['table'] = $this->getTable();
     $tab[47]['field'] = 'have_hdmi';
     $tab[47]['name'] = __('HDMI');
     $tab[47]['datatype'] = 'bool';
     $tab[48]['table'] = $this->getTable();
     $tab[48]['field'] = 'have_displayport';
     $tab[48]['name'] = __('DisplayPort');
     $tab[48]['datatype'] = 'bool';
     $tab[23]['table'] = 'glpi_manufacturers';
//.........这里部分代码省略.........
开发者ID:pvasener,项目名称:glpi,代码行数:101,代码来源:monitor.class.php

示例9: getSearchOptions

 function getSearchOptions()
 {
     $tab = array();
     $tab['common'] = __('Characteristics');
     $tab[1]['table'] = $this->getTable();
     $tab[1]['field'] = 'name';
     $tab[1]['name'] = __('Name');
     $tab[1]['datatype'] = 'itemlink';
     $tab[1]['massiveaction'] = false;
     $tab[2]['table'] = $this->getTable();
     $tab[2]['field'] = 'id';
     $tab[2]['name'] = __('ID');
     $tab[2]['massiveaction'] = false;
     $tab[2]['datatype'] = 'number';
     $tab += Location::getSearchOptionsToAdd();
     $tab[4]['table'] = 'glpi_phonetypes';
     $tab[4]['field'] = 'name';
     $tab[4]['name'] = __('Type');
     $tab[4]['datatype'] = 'dropdown';
     $tab[40]['table'] = 'glpi_phonemodels';
     $tab[40]['field'] = 'name';
     $tab[40]['name'] = __('Model');
     $tab[40]['datatype'] = 'dropdown';
     $tab[31]['table'] = 'glpi_states';
     $tab[31]['field'] = 'completename';
     $tab[31]['name'] = __('Status');
     $tab[31]['datatype'] = 'dropdown';
     $tab[31]['condition'] = "`is_visible_phone`";
     $tab[5]['table'] = $this->getTable();
     $tab[5]['field'] = 'serial';
     $tab[5]['name'] = __('Serial number');
     $tab[5]['datatype'] = 'string';
     $tab[6]['table'] = $this->getTable();
     $tab[6]['field'] = 'otherserial';
     $tab[6]['name'] = __('Inventory number');
     $tab[6]['datatype'] = 'string';
     $tab[7]['table'] = $this->getTable();
     $tab[7]['field'] = 'contact';
     $tab[7]['name'] = __('Alternate username');
     $tab[7]['datatype'] = 'string';
     $tab[8]['table'] = $this->getTable();
     $tab[8]['field'] = 'contact_num';
     $tab[8]['name'] = __('Alternate username number');
     $tab[8]['datatype'] = 'string';
     $tab[9]['table'] = $this->getTable();
     $tab[9]['field'] = 'number_line';
     $tab[9]['name'] = _x('quantity', 'Number of lines');
     $tab[9]['datatype'] = 'string';
     $tab[70]['table'] = 'glpi_users';
     $tab[70]['field'] = 'name';
     $tab[70]['name'] = __('User');
     $tab[70]['datatype'] = 'dropdown';
     $tab[70]['right'] = 'all';
     $tab[71]['table'] = 'glpi_groups';
     $tab[71]['field'] = 'completename';
     $tab[71]['name'] = __('Group');
     $tab[71]['condition'] = '`is_itemgroup`';
     $tab[71]['datatype'] = 'dropdown';
     $tab[19]['table'] = $this->getTable();
     $tab[19]['field'] = 'date_mod';
     $tab[19]['name'] = __('Last update');
     $tab[19]['datatype'] = 'datetime';
     $tab[19]['massiveaction'] = false;
     $tab[121]['table'] = $this->getTable();
     $tab[121]['field'] = 'date_creation';
     $tab[121]['name'] = __('Creation date');
     $tab[121]['datatype'] = 'datetime';
     $tab[121]['massiveaction'] = false;
     $tab[16]['table'] = $this->getTable();
     $tab[16]['field'] = 'comment';
     $tab[16]['name'] = __('Comments');
     $tab[16]['datatype'] = 'text';
     $tab[11]['table'] = $this->getTable();
     $tab[11]['field'] = 'brand';
     $tab[11]['name'] = __('Brand');
     $tab[11]['datatype'] = 'string';
     $tab[23]['table'] = 'glpi_manufacturers';
     $tab[23]['field'] = 'name';
     $tab[23]['name'] = __('Manufacturer');
     $tab[23]['datatype'] = 'dropdown';
     $tab[32]['table'] = $this->getTable();
     $tab[32]['field'] = 'firmware';
     $tab[32]['name'] = __('Firmware');
     $tab[32]['datatype'] = 'string';
     $tab[24]['table'] = 'glpi_users';
     $tab[24]['field'] = 'name';
     $tab[24]['linkfield'] = 'users_id_tech';
     $tab[24]['name'] = __('Technician in charge of the hardware');
     $tab[24]['datatype'] = 'dropdown';
     $tab[24]['right'] = 'own_ticket';
     $tab[49]['table'] = 'glpi_groups';
     $tab[49]['field'] = 'completename';
     $tab[49]['linkfield'] = 'groups_id_tech';
     $tab[49]['name'] = __('Group in charge of the hardware');
     $tab[49]['condition'] = '`is_assign`';
     $tab[49]['datatype'] = 'dropdown';
     $tab[42]['table'] = 'glpi_phonepowersupplies';
     $tab[42]['field'] = 'name';
     $tab[42]['name'] = __('Power supply');
     $tab[42]['datatype'] = 'dropdown';
//.........这里部分代码省略.........
开发者ID:btry,项目名称:glpi,代码行数:101,代码来源:phone.class.php

示例10: getSearchOptions


//.........这里部分代码省略.........
     $tab[21]['datatype'] = 'text';
     $tab[3]['table'] = $this->getTable();
     $tab[3]['field'] = 'priority';
     $tab[3]['name'] = __('Priority');
     $tab[3]['searchtype'] = 'equals';
     $tab[3]['datatype'] = 'specific';
     $tab[14]['table'] = 'glpi_projecttypes';
     $tab[14]['field'] = 'name';
     $tab[14]['name'] = __('Type');
     $tab[14]['datatype'] = 'dropdown';
     $tab[12]['table'] = 'glpi_projectstates';
     $tab[12]['field'] = 'name';
     $tab[12]['name'] = _x('item', 'State');
     $tab[12]['datatype'] = 'dropdown';
     $tab[15]['table'] = $this->getTable();
     $tab[15]['field'] = 'date';
     $tab[15]['name'] = __('Creation date');
     $tab[15]['datatype'] = 'datetime';
     $tab[15]['massiveaction'] = false;
     $tab[5]['table'] = $this->getTable();
     $tab[5]['field'] = 'percent_done';
     $tab[5]['name'] = __('Percent done');
     $tab[5]['datatype'] = 'number';
     $tab[5]['unit'] = '%';
     $tab[5]['min'] = 0;
     $tab[5]['max'] = 100;
     $tab[5]['step'] = 5;
     $tab[6]['table'] = $this->getTable();
     $tab[6]['field'] = 'show_on_global_gantt';
     $tab[6]['name'] = __('Show on global GANTT');
     $tab[6]['datatype'] = 'bool';
     $tab[24]['table'] = 'glpi_users';
     $tab[24]['field'] = 'name';
     $tab[24]['linkfield'] = 'users_id';
     $tab[24]['name'] = __('Manager');
     $tab[24]['datatype'] = 'dropdown';
     $tab[24]['right'] = 'see_project';
     $tab[49]['table'] = 'glpi_groups';
     $tab[49]['field'] = 'completename';
     $tab[49]['linkfield'] = 'groups_id';
     $tab[49]['name'] = __('Manager group');
     $tab[49]['condition'] = '`is_manager`';
     $tab[49]['datatype'] = 'dropdown';
     $tab[7]['table'] = $this->getTable();
     $tab[7]['field'] = 'plan_start_date';
     $tab[7]['name'] = __('Planned start date');
     $tab[7]['datatype'] = 'datetime';
     $tab[8]['table'] = $this->getTable();
     $tab[8]['field'] = 'plan_end_date';
     $tab[8]['name'] = __('Planned end date');
     $tab[8]['datatype'] = 'datetime';
     $tab[17]['table'] = $this->getTable();
     $tab[17]['field'] = '_virtual_planned_duration';
     $tab[17]['name'] = __('Planned duration');
     $tab[17]['datatype'] = 'specific';
     $tab[17]['nosearch'] = true;
     $tab[17]['massiveaction'] = false;
     $tab[17]['nosort'] = true;
     $tab[9]['table'] = $this->getTable();
     $tab[9]['field'] = 'real_start_date';
     $tab[9]['name'] = __('Real start date');
     $tab[9]['datatype'] = 'datetime';
     $tab[10]['table'] = $this->getTable();
     $tab[10]['field'] = 'real_end_date';
     $tab[10]['name'] = __('Real end date');
     $tab[10]['datatype'] = 'datetime';
     $tab[18]['table'] = $this->getTable();
     $tab[18]['field'] = '_virtual_effective_duration';
     $tab[18]['name'] = __('Effective duration');
     $tab[18]['datatype'] = 'specific';
     $tab[18]['nosearch'] = true;
     $tab[18]['massiveaction'] = false;
     $tab[18]['nosort'] = true;
     $tab[16]['table'] = $this->getTable();
     $tab[16]['field'] = 'comment';
     $tab[16]['name'] = __('Comments');
     $tab[16]['datatype'] = 'text';
     $tab[19]['table'] = $this->getTable();
     $tab[19]['field'] = 'date_mod';
     $tab[19]['name'] = __('Last update');
     $tab[19]['datatype'] = 'datetime';
     $tab[19]['massiveaction'] = false;
     $tab[121]['table'] = $this->getTable();
     $tab[121]['field'] = 'date_creation';
     $tab[121]['name'] = __('Creation date');
     $tab[121]['datatype'] = 'datetime';
     $tab[121]['massiveaction'] = false;
     $tab[80]['table'] = 'glpi_entities';
     $tab[80]['field'] = 'completename';
     $tab[80]['name'] = __('Entity');
     $tab[80]['datatype'] = 'dropdown';
     $tab[86]['table'] = $this->getTable();
     $tab[86]['field'] = 'is_recursive';
     $tab[86]['name'] = __('Child entities');
     $tab[86]['datatype'] = 'bool';
     // add objectlock search options
     $tab += ObjectLock::getSearchOptionsToAdd(get_class($this));
     $tab += Notepad::getSearchOptionsToAdd();
     return $tab;
 }
开发者ID:glpi-project,项目名称:glpi,代码行数:101,代码来源:project.class.php

示例11: getSearchOptions

 function getSearchOptions()
 {
     // Only use for History (not by search Engine)
     $tab = array();
     $tab['common'] = __('Characteristics');
     $tab[1]['table'] = $this->getTable();
     $tab[1]['field'] = 'name';
     $tab[1]['name'] = __('Name');
     $tab[1]['datatype'] = 'itemlink';
     $tab[1]['massiveaction'] = false;
     $tab[2]['table'] = $this->getTable();
     $tab[2]['field'] = 'id';
     $tab[2]['name'] = __('ID');
     $tab[2]['massiveaction'] = false;
     $tab[2]['datatype'] = 'number';
     $tab += Location::getSearchOptionsToAdd();
     $tab[16]['table'] = $this->getTable();
     $tab[16]['field'] = 'comment';
     $tab[16]['name'] = __('Comments');
     $tab[16]['datatype'] = 'text';
     $tab[62]['table'] = 'glpi_softwarecategories';
     $tab[62]['field'] = 'completename';
     $tab[62]['name'] = __('Category');
     $tab[62]['datatype'] = 'dropdown';
     $tab[19]['table'] = $this->getTable();
     $tab[19]['field'] = 'date_mod';
     $tab[19]['name'] = __('Last update');
     $tab[19]['datatype'] = 'datetime';
     $tab[19]['massiveaction'] = false;
     $tab[121]['table'] = $this->getTable();
     $tab[121]['field'] = 'date_creation';
     $tab[121]['name'] = __('Creation date');
     $tab[121]['datatype'] = 'datetime';
     $tab[121]['massiveaction'] = false;
     $tab[23]['table'] = 'glpi_manufacturers';
     $tab[23]['field'] = 'name';
     $tab[23]['name'] = __('Publisher');
     $tab[23]['datatype'] = 'dropdown';
     $tab[24]['table'] = 'glpi_users';
     $tab[24]['field'] = 'name';
     $tab[24]['linkfield'] = 'users_id_tech';
     $tab[24]['name'] = __('Technician in charge of the hardware');
     $tab[24]['datatype'] = 'dropdown';
     $tab[24]['right'] = 'own_ticket';
     $tab[49]['table'] = 'glpi_groups';
     $tab[49]['field'] = 'completename';
     $tab[49]['linkfield'] = 'groups_id_tech';
     $tab[49]['name'] = __('Group in charge of the hardware');
     $tab[49]['condition'] = '`is_assign`';
     $tab[49]['datatype'] = 'dropdown';
     $tab[70]['table'] = 'glpi_users';
     $tab[70]['field'] = 'name';
     $tab[70]['name'] = __('User');
     $tab[70]['datatype'] = 'dropdown';
     $tab[70]['right'] = 'all';
     $tab[71]['table'] = 'glpi_groups';
     $tab[71]['field'] = 'completename';
     $tab[71]['name'] = __('Group');
     $tab[71]['condition'] = '`is_itemgroup`';
     $tab[71]['datatype'] = 'dropdown';
     $tab[61]['table'] = $this->getTable();
     $tab[61]['field'] = 'is_helpdesk_visible';
     $tab[61]['name'] = __('Associable to a ticket');
     $tab[61]['datatype'] = 'bool';
     $tab[63]['table'] = $this->getTable();
     $tab[63]['field'] = 'is_valid';
     //TRANS: Indicator to know is all licenses of the software are valids
     $tab[63]['name'] = __('Valid licenses');
     $tab[63]['datatype'] = 'bool';
     $tab += SoftwareLicense::getSearchOptionsToAdd();
     $tab[80]['table'] = 'glpi_entities';
     $tab[80]['field'] = 'completename';
     $tab[80]['name'] = __('Entity');
     $tab[80]['massiveaction'] = false;
     $tab[80]['datatype'] = 'dropdown';
     $tab[72]['table'] = 'glpi_computers_softwareversions';
     $tab[72]['field'] = 'id';
     $tab[72]['name'] = _x('quantity', 'Number of installations');
     $tab[72]['forcegroupby'] = true;
     $tab[72]['usehaving'] = true;
     $tab[72]['datatype'] = 'count';
     $tab[72]['nometa'] = true;
     $tab[72]['massiveaction'] = false;
     if (Session::getLoginUserID()) {
         $tab[72]['joinparams'] = array('jointype' => 'child', 'condition' => "AND NEWTABLE.`is_deleted_computer` = '0'\n                                                          AND NEWTABLE.`is_deleted` = '0'\n                                                          AND NEWTABLE.`is_template_computer` = '0'\n                                                          " . getEntitiesRestrictRequest('AND', 'NEWTABLE'), 'beforejoin' => array('table' => 'glpi_softwareversions', 'joinparams' => array('jointype' => 'child')));
     }
     $tab[86]['table'] = $this->getTable();
     $tab[86]['field'] = 'is_recursive';
     $tab[86]['name'] = __('Child entities');
     $tab[86]['datatype'] = 'bool';
     $tab[86]['massiveaction'] = false;
     $tab['versions'] = _n('Version', 'Versions', Session::getPluralNumber());
     $tab[5]['table'] = 'glpi_softwareversions';
     $tab[5]['field'] = 'name';
     $tab[5]['name'] = __('Version name');
     $tab[5]['forcegroupby'] = true;
     $tab[5]['massiveaction'] = false;
     $tab[5]['joinparams'] = array('jointype' => 'child');
     $tab[5]['datatype'] = 'dropdown';
     $tab[31]['table'] = 'glpi_states';
//.........这里部分代码省略.........
开发者ID:btry,项目名称:glpi,代码行数:101,代码来源:software.class.php

示例12: getSearchOptions

 function getSearchOptions()
 {
     global $CFG_GLPI;
     $tab = array();
     $tab['common'] = __('Characteristics');
     $tab[1]['table'] = $this->getTable();
     $tab[1]['field'] = 'name';
     $tab[1]['name'] = __('Name');
     $tab[1]['datatype'] = 'itemlink';
     $tab[1]['massiveaction'] = false;
     $tab[2]['table'] = $this->getTable();
     $tab[2]['field'] = 'id';
     $tab[2]['name'] = __('ID');
     $tab[2]['massiveaction'] = false;
     $tab[2]['datatype'] = 'number';
     $tab[3]['table'] = $this->getTable();
     $tab[3]['field'] = 'filename';
     $tab[3]['name'] = __('File');
     $tab[3]['massiveaction'] = false;
     $tab[3]['datatype'] = 'string';
     $tab[4]['table'] = $this->getTable();
     $tab[4]['field'] = 'link';
     $tab[4]['name'] = __('Web Link');
     $tab[4]['datatype'] = 'weblink';
     $tab[5]['table'] = $this->getTable();
     $tab[5]['field'] = 'mime';
     $tab[5]['name'] = __('MIME type');
     $tab[5]['datatype'] = 'string';
     if ($CFG_GLPI['use_rich_text']) {
         $tab[6]['table'] = $this->getTable();
         $tab[6]['field'] = 'tag';
         $tab[6]['name'] = __('Tag');
         $tab[6]['datatype'] = 'text';
         $tab[6]['massiveaction'] = false;
     }
     $tab[7]['table'] = 'glpi_documentcategories';
     $tab[7]['field'] = 'completename';
     $tab[7]['name'] = __('Heading');
     $tab[7]['datatype'] = 'dropdown';
     $tab[80]['table'] = 'glpi_entities';
     $tab[80]['field'] = 'completename';
     $tab[80]['name'] = __('Entity');
     $tab[80]['massiveaction'] = false;
     $tab[80]['datatype'] = 'dropdown';
     $tab[86]['table'] = $this->getTable();
     $tab[86]['field'] = 'is_recursive';
     $tab[86]['name'] = __('Child entities');
     $tab[86]['datatype'] = 'bool';
     $tab[19]['table'] = $this->getTable();
     $tab[19]['field'] = 'date_mod';
     $tab[19]['name'] = __('Last update');
     $tab[19]['datatype'] = 'datetime';
     $tab[19]['massiveaction'] = false;
     $tab[121]['table'] = $this->getTable();
     $tab[121]['field'] = 'date_creation';
     $tab[121]['name'] = __('Creation date');
     $tab[121]['datatype'] = 'datetime';
     $tab[121]['massiveaction'] = false;
     $tab[20]['table'] = $this->getTable();
     $tab[20]['field'] = 'sha1sum';
     $tab[20]['name'] = sprintf(__('%1$s (%2$s)'), __('Checksum'), __('SHA1'));
     $tab[20]['massiveaction'] = false;
     $tab[20]['datatype'] = 'string';
     $tab[16]['table'] = $this->getTable();
     $tab[16]['field'] = 'comment';
     $tab[16]['name'] = __('Comments');
     $tab[16]['datatype'] = 'text';
     $tab[72]['table'] = 'glpi_documents_items';
     $tab[72]['field'] = 'id';
     $tab[72]['name'] = _x('quantity', 'Number of associated items');
     $tab[72]['forcegroupby'] = true;
     $tab[72]['usehaving'] = true;
     $tab[72]['datatype'] = 'count';
     $tab[72]['massiveaction'] = false;
     $tab[72]['joinparams'] = array('jointype' => 'child');
     // add objectlock search options
     $tab += ObjectLock::getSearchOptionsToAdd(get_class($this));
     $tab += Notepad::getSearchOptionsToAdd();
     return $tab;
 }
开发者ID:stweil,项目名称:glpi,代码行数:80,代码来源:document.class.php

示例13: getSearchOptions

 /**
  * Get the Search options for the given Type
  *
  * This should be overloaded in Class
  *
  * @return an array of search options
  * More information on https://forge.indepnet.net/wiki/glpi/SearchEngine
  **/
 function getSearchOptions()
 {
     $tab = array();
     $tab['common'] = __('Characteristics');
     $tab[1]['table'] = $this->getTable();
     $tab[1]['field'] = 'name';
     $tab[1]['name'] = __('Name');
     $tab[1]['datatype'] = 'itemlink';
     $tab[1]['massiveaction'] = false;
     // add objectlock search options
     $tab += ObjectLock::getSearchOptionsToAdd(get_class($this));
     return $tab;
 }
开发者ID:korial29,项目名称:glpi,代码行数:21,代码来源:commondbtm.class.php

示例14: getSearchOptions

 function getSearchOptions()
 {
     $tab = array();
     $tab['common'] = __('Characteristics');
     $tab[1]['table'] = $this->getTable();
     $tab[1]['field'] = 'completename';
     $tab[1]['name'] = __('Complete name');
     $tab[1]['datatype'] = 'itemlink';
     $tab[1]['massiveaction'] = false;
     $tab[2]['table'] = $this->getTable();
     $tab[2]['field'] = 'id';
     $tab[2]['name'] = __('ID');
     $tab[2]['massiveaction'] = false;
     $tab[2]['datatype'] = 'number';
     $tab[14]['table'] = $this->getTable();
     $tab[14]['field'] = 'name';
     $tab[14]['name'] = __('Name');
     $tab[14]['datatype'] = 'itemlink';
     $tab[14]['massiveaction'] = false;
     $tab[3]['table'] = $this->getTable();
     $tab[3]['field'] = 'address';
     $tab[3]['name'] = __('Address');
     $tab[3]['massiveaction'] = false;
     $tab[3]['datatype'] = 'text';
     $tab[4]['table'] = $this->getTable();
     $tab[4]['field'] = 'website';
     $tab[4]['name'] = __('Website');
     $tab[4]['massiveaction'] = false;
     $tab[4]['datatype'] = 'string';
     $tab[5]['table'] = $this->getTable();
     $tab[5]['field'] = 'phonenumber';
     $tab[5]['name'] = __('Phone');
     $tab[5]['massiveaction'] = false;
     $tab[5]['datatype'] = 'string';
     $tab[6]['table'] = $this->getTable();
     $tab[6]['field'] = 'email';
     $tab[6]['name'] = _n('Email', 'Emails', 1);
     $tab[6]['datatype'] = 'email';
     $tab[6]['massiveaction'] = false;
     $tab[10]['table'] = $this->getTable();
     $tab[10]['field'] = 'fax';
     $tab[10]['name'] = __('Fax');
     $tab[10]['massiveaction'] = false;
     $tab[10]['datatype'] = 'string';
     $tab[25]['table'] = $this->getTable();
     $tab[25]['field'] = 'postcode';
     $tab[25]['name'] = __('Postal code');
     $tab[25]['datatype'] = 'string';
     $tab[11]['table'] = $this->getTable();
     $tab[11]['field'] = 'town';
     $tab[11]['name'] = __('City');
     $tab[11]['massiveaction'] = false;
     $tab[11]['datatype'] = 'string';
     $tab[12]['table'] = $this->getTable();
     $tab[12]['field'] = 'state';
     $tab[12]['name'] = _x('location', 'State');
     $tab[12]['massiveaction'] = false;
     $tab[12]['datatype'] = 'string';
     $tab[13]['table'] = $this->getTable();
     $tab[13]['field'] = 'country';
     $tab[13]['name'] = __('Country');
     $tab[13]['massiveaction'] = false;
     $tab[13]['datatype'] = 'string';
     $tab[16]['table'] = $this->getTable();
     $tab[16]['field'] = 'comment';
     $tab[16]['name'] = __('Comments');
     $tab[16]['datatype'] = 'text';
     $tab[122]['table'] = $this->getTable();
     $tab[122]['field'] = 'date_mod';
     $tab[122]['name'] = __('Last update');
     $tab[122]['datatype'] = 'datetime';
     $tab[122]['massiveaction'] = false;
     $tab[121]['table'] = $this->getTable();
     $tab[121]['field'] = 'date_creation';
     $tab[121]['name'] = __('Creation date');
     $tab[121]['datatype'] = 'datetime';
     $tab[121]['massiveaction'] = false;
     // add objectlock search options
     $tab += ObjectLock::getSearchOptionsToAdd(get_class($this));
     $tab += Notepad::getSearchOptionsToAdd();
     $tab['advanced'] = __('Advanced information');
     $tab[7]['table'] = $this->getTable();
     $tab[7]['field'] = 'ldap_dn';
     $tab[7]['name'] = __('LDAP directory information attribute representing the entity');
     $tab[7]['massiveaction'] = false;
     $tab[7]['datatype'] = 'string';
     $tab[8]['table'] = $this->getTable();
     $tab[8]['field'] = 'tag';
     $tab[8]['name'] = __('Information in inventory tool (TAG) representing the entity');
     $tab[8]['massiveaction'] = false;
     $tab[8]['datatype'] = 'string';
     $tab[9]['table'] = 'glpi_authldaps';
     $tab[9]['field'] = 'name';
     $tab[9]['name'] = __('LDAP directory of an entity');
     $tab[9]['massiveaction'] = false;
     $tab[9]['datatype'] = 'dropdown';
     $tab[17]['table'] = $this->getTable();
     $tab[17]['field'] = 'entity_ldapfilter';
     $tab[17]['name'] = __('Search filter (if needed)');
     $tab[17]['massiveaction'] = false;
//.........这里部分代码省略.........
开发者ID:korial29,项目名称:glpi,代码行数:101,代码来源:entity.class.php

示例15: getSearchOptions

 function getSearchOptions()
 {
     $tab = array();
     $tab['common'] = __('Characteristics');
     $tab[1]['table'] = $this->getTable();
     $tab[1]['field'] = 'name';
     $tab[1]['name'] = __('Title');
     $tab[1]['datatype'] = 'itemlink';
     $tab[1]['massiveaction'] = false;
     $tab[1]['forcegroupby'] = true;
     $tab[2]['table'] = 'glpi_users';
     $tab[2]['field'] = 'name';
     $tab[2]['name'] = __('Writer');
     $tab[2]['datatype'] = 'dropdown';
     $tab[2]['massiveaction'] = false;
     $tab[2]['right'] = 'all';
     $tab[3]['table'] = $this->getTable();
     $tab[3]['field'] = 'state';
     $tab[3]['name'] = __('Status');
     $tab[3]['datatype'] = 'specific';
     $tab[3]['massiveaction'] = false;
     $tab[3]['searchtype'] = array('equals', 'notequals');
     $tab[4]['table'] = $this->getTable();
     $tab[4]['field'] = 'text';
     $tab[4]['name'] = __('Description');
     $tab[4]['massiveaction'] = false;
     $tab[4]['datatype'] = 'text';
     $tab[4]['htmltext'] = true;
     $tab[5]['table'] = $this->getTable();
     $tab[5]['field'] = 'begin_view_date';
     $tab[5]['name'] = __('Visibility start date');
     $tab[5]['datatype'] = 'datetime';
     $tab[6]['table'] = $this->getTable();
     $tab[6]['field'] = 'end_view_date';
     $tab[6]['name'] = __('Visibility end date');
     $tab[6]['datatype'] = 'datetime';
     $tab[7]['table'] = $this->getTable();
     $tab[7]['field'] = 'is_planned';
     $tab[7]['name'] = __('Planning');
     $tab[7]['datatype'] = 'bool';
     $tab[7]['massiveaction'] = false;
     $tab[8]['table'] = $this->getTable();
     $tab[8]['field'] = 'begin';
     $tab[8]['name'] = __('Planning start date');
     $tab[8]['datatype'] = 'datetime';
     $tab[9]['table'] = $this->getTable();
     $tab[9]['field'] = 'end';
     $tab[9]['name'] = __('Planning end date');
     $tab[9]['datatype'] = 'datetime';
     $tab[19]['table'] = $this->getTable();
     $tab[19]['field'] = 'date_mod';
     $tab[19]['name'] = __('Last update');
     $tab[19]['datatype'] = 'datetime';
     $tab[19]['massiveaction'] = false;
     $tab[121]['table'] = $this->getTable();
     $tab[121]['field'] = 'date_creation';
     $tab[121]['name'] = __('Creation date');
     $tab[121]['datatype'] = 'datetime';
     $tab[121]['massiveaction'] = false;
     // add objectlock search options
     $tab += ObjectLock::getSearchOptionsToAdd(get_class($this));
     return $tab;
 }
开发者ID:stweil,项目名称:glpi,代码行数:63,代码来源:reminder.class.php


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