/**
  * Init screen data.
  *
  * @param array		$options
  * @param string	$options['filter']
  * @param int		$options['filterTask']
  * @param int		$options['markColor']
  * @param boolean	$options['plaintext']
  * @param array		$options['itemids']
  */
 public function __construct(array $options = [])
 {
     parent::__construct($options);
     $this->resourcetype = SCREEN_RESOURCE_HISTORY;
     // mandatory
     $this->filter = isset($options['filter']) ? $options['filter'] : '';
     $this->filterTask = isset($options['filter_task']) ? $options['filter_task'] : null;
     $this->markColor = isset($options['mark_color']) ? $options['mark_color'] : MARK_COLOR_RED;
     $this->graphType = isset($options['graphtype']) ? $options['graphtype'] : GRAPH_TYPE_NORMAL;
     // optional
     $this->itemids = array_key_exists('itemids', $options) ? $options['itemids'] : [];
     $this->plaintext = isset($options['plaintext']) ? $options['plaintext'] : false;
 }
 /**
  * Init screen data.
  *
  * @param array		$options
  * @param int		$options['itemid']
  * @param string	$options['filter']
  * @param int		$options['filterTask']
  * @param int		$options['markColor']
  * @param boolean	$options['plaintext']
  * @param array		$options['items']
  * @param array		$options['item']
  */
 public function __construct(array $options = array())
 {
     parent::__construct($options);
     $this->resourcetype = SCREEN_RESOURCE_HISTORY;
     // mandatory
     $this->itemid = isset($options['itemid']) ? $options['itemid'] : null;
     $this->filter = isset($options['filter']) ? $options['filter'] : null;
     $this->filterTask = isset($options['filter_task']) ? $options['filter_task'] : null;
     $this->markColor = isset($options['mark_color']) ? $options['mark_color'] : MARK_COLOR_RED;
     // optional
     $this->items = isset($options['items']) ? $options['items'] : null;
     $this->item = isset($options['item']) ? $options['item'] : null;
     $this->plaintext = isset($options['plaintext']) ? $options['plaintext'] : false;
     if (empty($this->items)) {
         $this->items = API::Item()->get(array('nodeids' => get_current_nodeid(), 'itemids' => $this->itemid, 'webitems' => true, 'selectHosts' => array('hostid', 'name'), 'output' => API_OUTPUT_EXTEND, 'preservekeys' => true));
         $this->item = reset($this->items);
     }
 }
 /**
  * Init screen data.
  *
  * @param array		$options
  * @param array		$options['data']
  */
 public function __construct(array $options = [])
 {
     parent::__construct($options);
     $this->data = $options['data'];
 }
 /**
  * Init screen data.
  *
  * @param array		$options
  * @param int		$options['graphid']
  */
 public function __construct(array $options = array())
 {
     parent::__construct($options);
     $this->graphid = isset($options['graphid']) ? $options['graphid'] : null;
 }
 /**
  * Init screen data.
  *
  * @param array		$options
  * @param int		$options['graphid']
  */
 public function __construct(array $options = [])
 {
     parent::__construct($options);
     $this->graphid = isset($options['graphid']) ? $options['graphid'] : null;
     $this->profileIdx2 = $this->graphid;
 }