本文整理汇总了PHP中TicketValidation::getSearchOptionsToAdd方法的典型用法代码示例。如果您正苦于以下问题:PHP TicketValidation::getSearchOptionsToAdd方法的具体用法?PHP TicketValidation::getSearchOptionsToAdd怎么用?PHP TicketValidation::getSearchOptionsToAdd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TicketValidation
的用法示例。
在下文中一共展示了TicketValidation::getSearchOptionsToAdd方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSearchOptions
function getSearchOptions()
{
$tab = array();
$tab += $this->getSearchOptionsMain();
$tab[155]['table'] = $this->getTable();
$tab[155]['field'] = 'time_to_own';
$tab[155]['name'] = __('Time to own');
$tab[155]['datatype'] = 'datetime';
$tab[155]['maybefuture'] = true;
$tab[155]['massiveaction'] = false;
$tab[155]['additionalfields'] = array('status');
$tab[158]['table'] = $this->getTable();
$tab[158]['field'] = 'time_to_own';
$tab[158]['name'] = __('Time to own + Progress');
$tab[158]['massiveaction'] = false;
$tab[158]['nosearch'] = true;
$tab[158]['additionalfields'] = array('status');
$tab[159]['table'] = $this->getTable();
$tab[159]['field'] = 'is_late';
$tab[159]['name'] = __('Time to own exceedeed');
$tab[159]['datatype'] = 'bool';
$tab[159]['massiveaction'] = false;
$tab[159]['computation'] = "IF(TABLE.`time_to_own` IS NOT NULL\n AND TABLE.`status` <> " . self::WAITING . "\n AND (TABLE.`takeintoaccount_delay_stat`\n > TIME_TO_SEC(TIMEDIFF(TABLE.`time_to_own`,\n TABLE.`date`))\n OR (TABLE.`takeintoaccount_delay_stat` = 0\n AND TABLE.`time_to_own` < NOW())),\n 1, 0)";
$tab[14]['table'] = $this->getTable();
$tab[14]['field'] = 'type';
$tab[14]['name'] = __('Type');
$tab[14]['searchtype'] = 'equals';
$tab[14]['datatype'] = 'specific';
$tab[13]['table'] = 'glpi_items_tickets';
$tab[13]['field'] = 'items_id';
$tab[13]['name'] = _n('Associated element', 'Associated elements', Session::getPluralNumber());
$tab[13]['datatype'] = 'specific';
$tab[13]['comments'] = true;
$tab[13]['nosort'] = true;
$tab[13]['nosearch'] = true;
$tab[13]['additionalfields'] = array('itemtype');
$tab[13]['joinparams'] = array('jointype' => 'child');
$tab[13]['forcegroupby'] = true;
$tab[13]['massiveaction'] = false;
$tab[131]['table'] = 'glpi_items_tickets';
$tab[131]['field'] = 'itemtype';
$tab[131]['name'] = _n('Associated item type', 'Associated item types', Session::getPluralNumber());
$tab[131]['datatype'] = 'itemtypename';
$tab[131]['itemtype_list'] = 'ticket_types';
$tab[131]['nosort'] = true;
$tab[131]['additionalfields'] = array('itemtype');
$tab[131]['joinparams'] = array('jointype' => 'child');
$tab[131]['forcegroupby'] = true;
$tab[131]['massiveaction'] = false;
$tab[9]['table'] = 'glpi_requesttypes';
$tab[9]['field'] = 'name';
$tab[9]['name'] = __('Request source');
$tab[9]['datatype'] = 'dropdown';
// Can't use Location::getSearchOptionsToAdd because id conflicts
$tab[83]['table'] = 'glpi_locations';
$tab[83]['field'] = 'completename';
$tab[83]['name'] = __('Location');
$tab[83]['datatype'] = 'dropdown';
$tab[80]['table'] = 'glpi_entities';
$tab[80]['field'] = 'completename';
$tab[80]['name'] = __('Entity');
$tab[80]['massiveaction'] = false;
$tab[80]['datatype'] = 'dropdown';
// For ticket template
$tab[142]['table'] = 'glpi_documents';
$tab[142]['field'] = 'name';
$tab[142]['name'] = _n('Document', 'Documents', Session::getPluralNumber());
$tab[142]['forcegroupby'] = true;
$tab[142]['usehaving'] = true;
$tab[142]['nosearch'] = true;
$tab[142]['nodisplay'] = true;
$tab[142]['datatype'] = 'dropdown';
$tab[142]['massiveaction'] = false;
$tab[142]['joinparams'] = array('jointype' => 'items_id', 'beforejoin' => array('table' => 'glpi_documents_items', 'joinparams' => array('jointype' => 'itemtype_item')));
$tab += $this->getSearchOptionsActors();
$tab['slt'] = __('SLT');
$tab[37]['table'] = 'glpi_slts';
$tab[37]['field'] = 'name';
$tab[37]['linkfield'] = 'slts_tto_id';
$tab[37]['name'] = __('SLT') . " " . __('Time to own');
$tab[37]['massiveaction'] = false;
$tab[37]['datatype'] = 'dropdown';
$tab[37]['joinparams'] = array('condition' => "AND NEWTABLE.`type` = '" . SLT::TTO . "'");
$tab[37]['condition'] = "`glpi_slts`.`type` = '" . SLT::TTO . "'";
$tab[30]['table'] = 'glpi_slts';
$tab[30]['field'] = 'name';
$tab[30]['linkfield'] = 'slts_ttr_id';
$tab[30]['name'] = __('SLT') . " " . __('Time to resolve');
$tab[30]['massiveaction'] = false;
$tab[30]['datatype'] = 'dropdown';
$tab[30]['joinparams'] = array('condition' => "AND NEWTABLE.`type` = '" . SLT::TTR . "'");
$tab[30]['condition'] = "`glpi_slts`.`type` = '" . SLT::TTR . "'";
$tab[32]['table'] = 'glpi_slalevels';
$tab[32]['field'] = 'name';
$tab[32]['name'] = __('Escalation level');
$tab[32]['massiveaction'] = false;
$tab[32]['datatype'] = 'dropdown';
$tab[32]['joinparams'] = array('beforejoin' => array('table' => 'glpi_slalevels_tickets', 'joinparams' => array('jointype' => 'child')));
$tab[32]['forcegroupby'] = true;
$tab += TicketValidation::getSearchOptionsToAdd();
//.........这里部分代码省略.........