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