2014-05-14 23:24:20 +10:00
|
|
|
<?php namespace Backend\Classes;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Report Widget base class
|
|
|
|
* Report widgets are used inside the ReportContainer.
|
|
|
|
*
|
|
|
|
* @package october\backend
|
|
|
|
* @author Alexey Bobkov, Samuel Georges
|
|
|
|
*/
|
|
|
|
class ReportWidgetBase extends WidgetBase
|
|
|
|
{
|
|
|
|
use \System\Traits\PropertyContainer;
|
|
|
|
|
|
|
|
public function __construct($controller, $properties = [])
|
|
|
|
{
|
|
|
|
$this->properties = $this->validateProperties($properties);
|
|
|
|
|
2019-02-13 15:05:18 -06:00
|
|
|
/*
|
|
|
|
* Ensure the provided alias (if present) takes effect as the widget configuration is
|
|
|
|
* not passed to the WidgetBase constructor which would normally take care of that
|
|
|
|
*/
|
|
|
|
if (!isset($this->alias)) {
|
|
|
|
$this->alias = $properties['alias'] ?? $this->defaultAlias;
|
|
|
|
}
|
|
|
|
|
2014-05-14 23:24:20 +10:00
|
|
|
parent::__construct($controller);
|
|
|
|
}
|
2014-10-10 23:12:50 +02:00
|
|
|
}
|