Search::showList PHP Method

showList() static public method

Display result table for search engine for an type
static public showList ( $itemtype, $params ) : nothing
$itemtype item type to manage
$params search params passed to prepareDatasForSearch function
return nothing
    static function showList($itemtype, $params)
    {
        $data = self::prepareDatasForSearch($itemtype, $params);
        self::constructSQL($data);
        self::constructDatas($data);
        self::displayDatas($data);
    }

Usage Example

 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == 'Computer') {
         if (self::canView()) {
             // Show list filtered on computer, sorted on day descending ...
             $_GET = array('field' => array(22), 'searchtype' => array('equals'), 'contains' => array($item->getID()), 'itemtype' => 'PluginMonitoringServiceevent', 'start' => 0, 'sort' => 3, 'order' => 'DESC');
             Search::manageGetValues(self::getTypeName());
             Search::showList(self::getTypeName(), $_GET);
             return true;
         }
     }
     return true;
 }
All Usage Examples Of Search::showList