public function __construct($label, $type, $options = null, $htmlOptions = null) { $this->label = $label; $this->type = $type; $this->htmlOptions = $htmlOptions; if (!isset($this->htmlOptions['class'])) { $this->htmlOptions['class'] = ''; } if (is_array($options)) { foreach ($options as $key => $value) { $this->options[$key] = $value; } } }
/** * Constructor * @param $targetSelector string Selector for target to receive event. */ function __construct($targetSelector, $url, $title) { parent::__construct($targetSelector, 'addTab', array('url' => $url, 'title' => $title)); }