本文整理汇总了PHP中CommonDBChild::getSearchOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP CommonDBChild::getSearchOptions方法的具体用法?PHP CommonDBChild::getSearchOptions怎么用?PHP CommonDBChild::getSearchOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CommonDBChild
的用法示例。
在下文中一共展示了CommonDBChild::getSearchOptions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSearchOptions
function getSearchOptions()
{
global $CFG_GLPI;
$tab = parent::getSearchOptions();
$optionIndex = 10;
// From 10 to 14
foreach (self::getMotives() as $motive => $name) {
$tab[$optionIndex]['table'] = $this->getTable();
$tab[$optionIndex]['field'] = $motive;
$tab[$optionIndex]['name'] = $name;
$tab[$optionIndex]['datatype'] = 'bool';
$optionIndex++;
}
$tab[20]['table'] = $this->getTable();
$tab[20]['field'] = 'ip';
$tab[20]['datatype'] = 'ip';
$tab[20]['name'] = IPAddress::getTypeName(1);
$tab[21]['table'] = $this->getTable();
$tab[21]['field'] = 'netmask';
$tab[21]['datatype'] = 'string';
$tab[21]['name'] = IPNetmask::getTypeName(1);
$tab[22]['table'] = $this->getTable();
$tab[22]['field'] = 'subnet';
$tab[22]['datatype'] = 'string';
$tab[22]['name'] = __('Network address');
$tab[23]['table'] = $this->getTable();
$tab[23]['field'] = 'gateway';
$tab[23]['datatype'] = 'string';
$tab[23]['name'] = IPAddress::getTypeName(1);
if (TableExists('glpi_networkinterfaces')) {
$tab[24]['table'] = 'glpi_networkinterfaces';
$tab[24]['field'] = 'name';
$tab[24]['datatype'] = 'dropdown';
$tab[24]['name'] = __('Network interface');
}
return $tab;
}