Lines Matching refs:options

95 	 * @param array		$options
96 * @param boolean $options['isFlickerfree']
97 * @param string $options['pageFile']
98 * @param int $options['mode']
99 * @param int $options['timestamp']
100 * @param int $options['hostid']
101 * @param int $options['period']
102 * @param int $options['stime']
103 * @param string $options['profileIdx']
104 * @param int $options['profileIdx2']
105 * @param boolean $options['updateProfile']
106 * @param array $options['screen']
108 public function __construct(array $options = []) { argument
109 $this->isFlickerfree = isset($options['isFlickerfree']) ? $options['isFlickerfree'] : true;
110 $this->mode = isset($options['mode']) ? $options['mode'] : SCREEN_MODE_SLIDESHOW;
111 $this->timestamp = !empty($options['timestamp']) ? $options['timestamp'] : time();
112 $this->hostid = !empty($options['hostid']) ? $options['hostid'] : null;
115 if (!empty($options['pageFile'])) {
116 $this->pageFile = $options['pageFile'];
124 if (!empty($options['screen'])) {
125 $this->screen = $options['screen'];
127 elseif (array_key_exists('screenid', $options) && $options['screenid'] > 0) {
129 'screenids' => $options['screenid'],
144 $this->profileIdx = !empty($options['profileIdx']) ? $options['profileIdx'] : '';
145 $this->profileIdx2 = !empty($options['profileIdx2']) ? $options['profileIdx2'] : null;
146 $this->updateProfile = isset($options['updateProfile']) ? $options['updateProfile'] : true;
152 'period' => !empty($options['period']) ? $options['period'] : null,
153 'stime' => !empty($options['stime']) ? $options['stime'] : null
162 * @param array $options
163 * @param int $options['resourcetype']
164 * @param int $options['screenitemid']
165 * @param int $options['hostid']
166 * @param array $options['screen']
167 * @param int $options['screenid']
171 public static function getScreen(array $options = []) { argument
172 if (!array_key_exists('resourcetype', $options)) {
173 $options['resourcetype'] = null;
176 if (!array_key_exists('screenitem', $options) && array_key_exists('screenitemid', $options)) {
177 if (array_key_exists('hostid', $options) && $options['hostid'] > 0) {
178 $options['screenitem'] = API::TemplateScreenItem()->get([
179 'screenitemids' => $options['screenitemid'],
180 'hostids' => $options['hostid'],
185 $options['screenitem'] = API::ScreenItem()->get([
186 'screenitemids' => $options['screenitemid'],
190 $options['screenitem'] = reset($options['screenitem']);
193 if (is_array($options['screenitem']) && array_key_exists('screenitem', $options)
194 && array_key_exists('resourcetype', $options['screenitem'])) {
195 $options['resourcetype'] = $options['screenitem']['resourcetype'];
202 if ($options['resourcetype'] === null) {
207 switch ($options['resourcetype']) {
209 return new CScreenGraph($options);
212 return new CScreenSimpleGraph($options);
215 return new CScreenMap($options);
218 return new CScreenPlainText($options);
221 return new CScreenHostsInfo($options);
224 return new CScreenTriggersInfo($options);
227 return new CScreenServerInfo($options);
230 return new CScreenClock($options);
233 return new CScreenScreen($options);
236 return new CScreenTriggersOverview($options);
239 return new CScreenDataOverview($options);
242 $options = self::appendTemplatedScreenOption($options);
243 return new CScreenUrl($options);
246 return new CScreenActions($options);
249 return new CScreenEvents($options);
252 return new CScreenHostgroupTriggers($options);
255 return new CScreenSystemStatus($options);
258 return new CScreenHostTriggers($options);
261 return new CScreenHistory($options);
264 return new CScreenChart($options);
267 $options = self::appendTemplatedScreenOption($options);
268 return new CScreenLldGraph($options);
271 $options = self::appendTemplatedScreenOption($options);
272 return new CScreenLldSimpleGraph($options);
275 return new CScreenHttpTestDetails($options);
278 return new CScreenDiscovery($options);
281 return new CScreenHttpTest($options);
291 * @param array $options
295 protected static function appendTemplatedScreenOption(array $options) { argument
296 if (array_key_exists('screen', $options)) {
297 $options['isTemplatedScreen'] = (bool) $options['screen']['templateid'];
299 elseif (array_key_exists('screenid', $options) && $options['screenid'] > 0) {
300 $options['isTemplatedScreen'] = (bool) API::TemplateScreen()->get([
301 'screenids' => [$options['screenid']],
306 return $options;
639 * @param array $options
640 * @param array $options['timeline']
641 * @param string $options['profileIdx']
643 public static function insertScreenScrollJs(array $options = []) { argument
644 $options['timeline'] = empty($options['timeline']) ? '' : $options['timeline'];
645 $options['profileIdx'] = empty($options['profileIdx']) ? '' : $options['profileIdx'];
651 'periodFixed' => CProfile::get($options['profileIdx'].'.timelinefixed', 1),
655 …zbx_add_post_js('timeControl.addObject("scrollbar", '.zbx_jsvalue($options['timeline']).', '.zbx_j…
699 * @param array $options
700 * @param array $options['timeline']
701 * @param string $options['profileIdx']
705 public static function insertScreenStandardJs(array $options = []) { argument
706 CScreenBuilder::insertScreenScrollJs($options);