Lines Matching refs:options

38 	 * @param array  $options
39 * @param array $options['groupids'] HostGroup IDs
40 * @param bool $options['monitored_hosts'] only monitored Hosts
41 * @param bool $options['templated_hosts'] include templates in result
42 * @param bool $options['with_items'] only with items
43 * @param bool $options['with_triggers'] only with triggers
44 * @param bool $options['with_httptests'] only with http tests
45 * @param bool $options['with_graphs'] only with graphs
46 * @param bool $options['editable'] only with read-write permission. Ignored for SuperAdmins
47 * @param bool $options['selectTemplates'] select Templates
48 * @param bool $options['selectItems'] select Items
49 * @param bool $options['selectTriggers'] select Triggers
50 * @param bool $options['selectGraphs'] select Graphs
51 * @param int $options['count'] count Hosts, returned column name is rowscount
52 * @param string $options['pattern'] search hosts by pattern in Host name
53 * @param string $options['extendPattern'] search hosts by pattern in Host name, ip and DNS
54 * @param int $options['limit'] limit selection
55 * @param string $options['sortfield'] field to sort by
56 * @param string $options['sortorder'] sort order
60 public function get($options = []) { argument
97 $options = zbx_array_merge($defOptions, $options);
104 if (!is_null($options['dhostids'])) {
105 zbx_value2array($options['dhostids']);
106 $sqlParts['where']['dhostid'] = dbConditionInt('dh.dhostid', $options['dhostids']);
110 if (!is_null($options['druleids'])) {
111 zbx_value2array($options['druleids']);
113 $sqlParts['where']['druleid'] = dbConditionInt('dh.druleid', $options['druleids']);
115 if ($options['groupCount']) {
121 if (!is_null($options['dserviceids'])) {
122 zbx_value2array($options['dserviceids']);
125 $sqlParts['where'][] = dbConditionInt('ds.dserviceid', $options['dserviceids']);
128 if ($options['groupCount']) {
134 if (is_array($options['filter'])) {
135 $this->dbFilter('dhosts dh', $options, $sqlParts);
139 if (is_array($options['search'])) {
140 zbx_db_search('dhosts dh', $options, $sqlParts);
144 if (zbx_ctype_digit($options['limit']) && $options['limit']) {
145 $sqlParts['limit'] = $options['limit'];
149 …$sqlParts = $this->applyQueryOutputOptions($this->tableName(), $this->tableAlias(), $options, $sql…
150 …$sqlParts = $this->applyQuerySortOptions($this->tableName(), $this->tableAlias(), $options, $sqlPa…
153 if ($options['countOutput']) {
154 if ($options['groupCount']) {
166 if ($options['countOutput']) {
171 $result = $this->addRelatedObjects($options, $result);
172 $result = $this->unsetExtraFields($result, ['druleid'], $options['output']);
176 if (!$options['preservekeys']) {
183 …protected function applyQueryOutputOptions($tableName, $tableAlias, array $options, array $sqlPart… argument
184 $sqlParts = parent::applyQueryOutputOptions($tableName, $tableAlias, $options, $sqlParts);
186 if (!$options['countOutput']) {
187 if ($options['selectDRules'] !== null) {
195 protected function addRelatedObjects(array $options, array $result) { argument
196 $result = parent::addRelatedObjects($options, $result);
201 if ($options['selectDRules'] !== null && $options['selectDRules'] != API_OUTPUT_COUNT) {
204 'output' => $options['selectDRules'],
209 if (!is_null($options['limitSelects'])) {
213 $result = $relationMap->mapMany($result, $drules, 'drules', $options['limitSelects']);
217 if (!is_null($options['selectDServices'])) {
218 if ($options['selectDServices'] != API_OUTPUT_COUNT) {
220 'output' => $this->outputExtend($options['selectDServices'], ['dserviceid', 'dhostid']),
226 …$dservices = $this->unsetExtraFields($dservices, ['dserviceid', 'dhostid'], $options['selectDServi…
227 if (!is_null($options['limitSelects'])) {
230 $result = $relationMap->mapMany($result, $dservices, 'dservices', $options['limitSelects']);
234 'output' => $options['selectDServices'],