public function __construct() { parent::__construct(); $this->optionsArrayName = EPR_MAIN_OPTIONS_ARRAY_NAME; $this->defaults = erpDefaults::$mainOpts + erpDefaults::$comOpts; $this->loadOptions(); }
public function __construct(array $instance = NULL) { parent::__construct(); $this->optionsArrayName = 'widget_' . erpDefaults::erpWidgetOptionsArrayName; $this->defaults = erpDefaults::$widOpts + erpDefaults::$comOpts; if ($instance !== NULL && !empty($instance)) { $this->options = $instance; } else { $this->options = $this->defaults; } }