/** * * @param type $parameterNames * @param type $count * @param type $offset * @param type $order * @param type $sort * @param array $filters * @param type $filterType * @return type */ public static function getListBySearch($parameterNames = "*", $count = -1, $offset = 0, $order = null, $sort = "ASC", $filters = array(), $filterType = "OR") { $filters['activate'] = '1'; $aAddFilters = array(); $tablesString = null; if (array('tagname', array_values($filters)) && !empty($filters['tagname'])) { $aAddFilters = array('tables' => array('cfg_tags', 'cfg_tags_bas'), 'join' => array('cfg_tags.tag_id = cfg_tags_bas.tag_id', 'cfg_tags_bas.resource_id = cfg_bam.ba_id ')); } return parent::getListBySearch($parameterNames, $count, $offset, $order, $sort, $filters, $filterType, $tablesString, null, $aAddFilters); }
/** * * @param type $parameterNames * @param type $count * @param type $offset * @param type $order * @param type $sort * @param array $filters * @param type $filterType * @return type */ public static function getListBySearch($parameterNames = "*", $count = -1, $offset = 0, $order = null, $sort = "ASC", $filters = array(), $filterType = "OR") { $aAddFilters = array(); $tablesString = null; $aGroup = array(); // Filter by service template if (isset($filters['svc_tmpl_id']) && !empty($filters['svc_tmpl_id'])) { $serviceTemplateId = Servicetemplate::getIdByParameter('service_description', $filters['svc_tmpl_id'], array(), 'LIKE'); unset($filters['svc_tmpl_id']); if (count($serviceTemplateId)) { foreach ($serviceTemplateId as $id) { $filters['svc_tmpl_id'][] = $id; } } else { $count = 0; } } return parent::getListBySearch($parameterNames, $count, $offset, $order, $sort, $filters, $filterType, $tablesString, null, $aAddFilters, $aGroup); }
/** * * @param type $parameterNames * @param type $count * @param type $offset * @param type $order * @param type $sort * @param array $filters * @param type $filterType * @return type */ public static function getListBySearch($parameterNames = "*", $count = -1, $offset = 0, $order = null, $sort = "ASC", $filters = array(), $filterType = "OR") { $aAddFilters = array(); $tablesString = null; $aGroup = array(); // Filter by kpi name if (isset($filters['object']) && !empty($filters['object'])) { $indicatorsName = IndicatorRepository::getIndicatorsName($filters['object']); if (count($indicatorsName)) { foreach ($indicatorsName as $indicatorName) { $filters['kpi_id'][] = $indicatorName['id']; } } else { $count = 0; } unset($filters['object']); } return parent::getListBySearch($parameterNames, $count, $offset, $order, $sort, $filters, $filterType, $tablesString, null, $aAddFilters, $aGroup); }
/** * * @param type $parameterNames * @param type $count * @param type $offset * @param type $order * @param type $sort * @param array $filters * @param type $filterType * @return type */ public static function getListBySearch($parameterNames = "*", $count = -1, $offset = 0, $order = null, $sort = "ASC", $filters = array(), $filterType = "OR") { $filters['host_register'] = '0'; $tablesString = ''; $aAddFilters = array(); $aGroup = array(); if (array('tagname', array_values($filters)) && !empty($filters['tagname'])) { $aAddFilters = array('tables' => array('cfg_tags', 'cfg_tags_hosts'), 'join' => array('cfg_tags.tag_id = cfg_tags_hosts.tag_id', 'cfg_tags_hosts.resource_id=cfg_hosts.host_id ')); } if (isset($filters['tagname']) && count($filters['tagname']) > 1) { $aGroup = array('sField' => 'cfg_tags_hosts.resource_id', 'nb' => count($filters['tagname'])); } return parent::getListBySearch($parameterNames, $count, $offset, $order, $sort, $filters, $filterType, $tablesString, null, $aAddFilters, $aGroup); }
/** * * @param type $parameterNames * @param type $count * @param type $offset * @param type $order * @param type $sort * @param array $filters * @param type $filterType * @return type */ public static function getListBySearch($parameterNames = "*", $count = -1, $offset = 0, $order = null, $sort = "ASC", $filters = array(), $filterType = "OR") { $aAddFilters = array(); $tablesString = ''; $aGroup = array(); $filters['service_register'] = '1'; if (is_array($filterType)) { $filterType['service_register'] = 'AND'; } else { $filterType = array('*' => $filterType, 'service_register' => 'AND'); } if (isset($filters['tagname']) && count($filters['tagname']) > 1) { $aGroup = array('sField' => 'cfg_tags_services.resource_id', 'nb' => count($filters['tagname'])); } return parent::getListBySearch($parameterNames, $count, $offset, $order, $sort, $filters, $filterType, $tablesString, null, $aAddFilters, $aGroup); }
/** * * @param type $parameterNames * @param type $count * @param type $offset * @param type $order * @param type $sort * @param array $filters * @param type $filterType * @return type */ public static function getListBySearch($parameterNames = "*", $count = -1, $offset = 0, $order = null, $sort = "ASC", $filters = array(), $filterType = "OR") { $aAddFilters = array(); $aGroup = array(); $filters['service_register'] = '0'; if (is_array($filterType)) { $filterType['service_register'] = 'AND'; } else { $filterType = array('*' => $filterType, 'service_register' => 'AND'); } if (array('tagname', array_values($filters)) && !empty($filters['tagname'])) { $aAddFilters = array('tables' => array('cfg_tags', 'cfg_tags_services'), 'join' => array('cfg_tags.tag_id = cfg_tags_services.tag_id', 'cfg_tags_services.resource_id=cfg_services.service_id ')); } if (isset($filters['tagname']) && count($filters['tagname']) > 1) { $aGroup = array('sField' => 'cfg_tags_services.resource_id', 'nb' => count($filters['tagname'])); } return parent::getListBySearch($parameterNames, $count, $offset, $order, $sort, $filters, $filterType, null, null, $aAddFilters, $aGroup); }