Ui
Ui elements
Ui elements
Create element:
$Button = $this->get('ui','button',Array(
'title' => 'Save',
'color' => 'green'
));
Set html attributes
eUiElements elements can be modified like any eHtmlElement:
$Button = $this->get('ui','button',Array(
'title' => 'Create customer',
'color' => 'green',
'link' => 'table/customer/page/addnew'
))
->setRole('create-customer')
->setAttr('target','_blank');
See available Ui elements in your application.
Predefined INPUT methods are called through ui resource with 'input/type-name' -syntax and can be used the same way as other ui elements:
$Input = $this->get('ui','input/date',Array(
'name' => 'form_name',
'value' => $value
));
Or in javascript:
cms.get('ui','input/date',{
name: 'form_name',
value: $value
});
See list of all Ui input methods
Method | Return | Description |
---|---|---|
create(name,arg,..) | eUiElement | Create ui element. |
name(args...) | eUiElement | Create ui element. |
getStyleList(type) | array | Get list of style names: size, color, status, action color |
getElementList() | array | Get list of all available ui elements. |
eUiElement extend eHtmlElement
Elements handle styling classes different ways, like using element-specifig prefixes or set style in different levels. SetStyle() etc. methods adds profixes automatically like defined in the type -class.
Method | Return | Description |
---|---|---|
setColor(name) | this | Set color definition * |
setSize(name) | this | Set size definition * |
setState(name) | this | Set state class to element |
setStyle(name) | this | Set style class to element * |
addStyle(name) | this | Add style class to element * |
UiElement may construct of multiple elements. Like Button is created using icon and title -elements.
Method | Return | Description |
---|---|---|
getElement(name) | this | Get subelement. Create on first call. |
addElement(name[,$params]) | this | Create element and add it to this. |
newElement(name[,$params]) | Element | Create element and add it to this. Return the element. |
createElement(name[,$params]) | Element | Create and return new ui/html -element. |