public -> protected $defaultAlias
This commit is contained in:
parent
c035f81b0f
commit
85c47c4e01
|
|
@ -29,16 +29,16 @@ abstract class WidgetBase
|
|||
*/
|
||||
protected $controller;
|
||||
|
||||
/**
|
||||
* @var string A unique alias to identify this widget.
|
||||
*/
|
||||
public $defaultAlias = 'widget';
|
||||
|
||||
/**
|
||||
* @var string Defined alias used for this widget.
|
||||
*/
|
||||
public $alias;
|
||||
|
||||
/**
|
||||
* @var string A unique alias to identify this widget.
|
||||
*/
|
||||
protected $defaultAlias = 'widget';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param Backend\Classes\Controller $controller
|
||||
|
|
@ -80,26 +80,6 @@ abstract class WidgetBase
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Transfers config values stored inside the $config property directly
|
||||
* on to the root object properties. If no properties are defined
|
||||
* all config will be transferred if finds a match.
|
||||
* @param array $properties
|
||||
* @return void
|
||||
*/
|
||||
protected function fillFromConfig($properties = null)
|
||||
{
|
||||
if ($properties === null) {
|
||||
$properties = array_keys((array) $this->config);
|
||||
}
|
||||
|
||||
foreach ($properties as $property) {
|
||||
if (property_exists($this, $property)) {
|
||||
$this->{$property} = $this->getConfig($property, $this->{$property});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the widget, called by the constructor and free from its parameters.
|
||||
* @return void
|
||||
|
|
@ -138,6 +118,26 @@ abstract class WidgetBase
|
|||
$this->controller->widget->{$this->alias} = $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transfers config values stored inside the $config property directly
|
||||
* on to the root object properties. If no properties are defined
|
||||
* all config will be transferred if it finds a matching property.
|
||||
* @param array $properties
|
||||
* @return void
|
||||
*/
|
||||
protected function fillFromConfig($properties = null)
|
||||
{
|
||||
if ($properties === null) {
|
||||
$properties = array_keys((array) $this->config);
|
||||
}
|
||||
|
||||
foreach ($properties as $property) {
|
||||
if (property_exists($this, $property)) {
|
||||
$this->{$property} = $this->getConfig($property, $this->{$property});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a unique ID for this widget. Useful in creating HTML markup.
|
||||
* @param string $suffix An extra string to append to the ID.
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class CodeEditor extends FormWidgetBase
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public $defaultAlias = 'codeeditor';
|
||||
protected $defaultAlias = 'codeeditor';
|
||||
|
||||
/**
|
||||
* @var string Code language to display (php, twig)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class ColorPicker extends FormWidgetBase
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public $defaultAlias = 'colorpicker';
|
||||
protected $defaultAlias = 'colorpicker';
|
||||
|
||||
/**
|
||||
* @var array Default available colors
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class DataGrid extends FormWidgetBase
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public $defaultAlias = 'datagrid';
|
||||
protected $defaultAlias = 'datagrid';
|
||||
|
||||
/**
|
||||
* @var string Grid size
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class DataTable extends FormWidgetBase
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public $defaultAlias = 'datatable';
|
||||
protected $defaultAlias = 'datatable';
|
||||
|
||||
/**
|
||||
* @var string Table size
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class DatePicker extends FormWidgetBase
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public $defaultAlias = 'datepicker';
|
||||
protected $defaultAlias = 'datepicker';
|
||||
|
||||
/**
|
||||
* @var bool Display mode: datetime, date, time.
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class FileUpload extends FormWidgetBase
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public $defaultAlias = 'fileupload';
|
||||
protected $defaultAlias = 'fileupload';
|
||||
|
||||
/**
|
||||
* @var int Preview image width
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class RecordFinder extends FormWidgetBase
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public $defaultAlias = 'recordfinder';
|
||||
protected $defaultAlias = 'recordfinder';
|
||||
|
||||
/**
|
||||
* @var string Relationship type
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class Relation extends FormWidgetBase
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public $defaultAlias = 'relation';
|
||||
protected $defaultAlias = 'relation';
|
||||
|
||||
/**
|
||||
* @var string Relationship type
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class RichEditor extends FormWidgetBase
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public $defaultAlias = 'richeditor';
|
||||
protected $defaultAlias = 'richeditor';
|
||||
|
||||
/**
|
||||
* @var boolean Determines whether content has HEAD and HTML tags.
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class Filter extends WidgetBase
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public $defaultAlias = 'filter';
|
||||
protected $defaultAlias = 'filter';
|
||||
|
||||
/**
|
||||
* @var boolean Determines if scope definitions have been created.
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class Form extends WidgetBase
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public $defaultAlias = 'form';
|
||||
protected $defaultAlias = 'form';
|
||||
|
||||
/**
|
||||
* @var Model Form model object.
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class Grid extends WidgetBase
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public $defaultAlias = 'grid';
|
||||
protected $defaultAlias = 'grid';
|
||||
|
||||
/**
|
||||
* @var array Grid columns
|
||||
|
|
|
|||
|
|
@ -55,6 +55,11 @@ class ReportContainer extends WidgetBase
|
|||
// Object properties
|
||||
//
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected $defaultAlias = 'reportContainer';
|
||||
|
||||
/**
|
||||
* @var array Collection of all report widgets used by this container.
|
||||
*/
|
||||
|
|
@ -65,11 +70,6 @@ class ReportContainer extends WidgetBase
|
|||
*/
|
||||
protected $reportsDefined = false;
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public $defaultAlias = 'reportContainer';
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class Search extends WidgetBase
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public $defaultAlias = 'search';
|
||||
protected $defaultAlias = 'search';
|
||||
|
||||
/**
|
||||
* @var string Search placeholder text.
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class Table extends WidgetBase
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public $defaultAlias = 'table';
|
||||
protected $defaultAlias = 'table';
|
||||
|
||||
/**
|
||||
* @var array Table columns
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class Toolbar extends WidgetBase
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public $defaultAlias = 'toolbar';
|
||||
protected $defaultAlias = 'toolbar';
|
||||
|
||||
/**
|
||||
* @var WidgetBase Reference to the search widget object.
|
||||
|
|
|
|||
Loading…
Reference in New Issue