Fields settings
'tab'=>1, |
the field is displayed on tab with this index (0, 1... 1 - second tab) Tab names are set in It is good to have at least one tab set for e_admin (dynamically added tabs) working correctly. |
'nolist'=>true, |
the field is not displayed in Read mode, no option to select in Columns display option, very often with 'type' => 'hidden' , |
'batch'=>1 |
the field is added to batch options and multiple rows change is possible |
Field types
'type' => null, |
|
'type' => 'number', |
|
'type' => 'boolean', |
Default generated value by plugin builder:
The result is ON/OFF switcher The parameter to change the text to YES/NO
Custom labels
|
'type' => 'text', |
|
'type' => 'user', |
|
'type' => 'userclass', |
|
'type' => 'url', |
|
'type' => 'datestamp', |
Minimal settings:
Read only:
|
'type' => 'file', |
|
'type' => 'media', |
|
'type' => 'icon', |
|
'type' => 'image', |
SEF-URL field
SEF-URL field
the field, when the button that generates SEF-URL code, is added. 'sef' is field that is used for generating value of this field. The way of the result is set in preferences under URL Configuration settings.
Basic settings:
'sef' => array ( 'title' => LAN_SEFURL, 'type' => 'text', 'data' => 'str', 'writeParms' => 'size=xxlarge&sef=title' ),
Batch option:
'news_sef' => array('title' => LAN_SEFURL, 'batch'=>1, (....) 'writeParms'=>array('size'=>'xxlarge', 'show'=>1, 'sef'=>'news_title'))
ID field
protected $pid = "category_id";
By default is not displayed as a column. To display it you need to set 'forced' true.
'forced'=>true |
Display this field, otherwise it is hidden, you can't select it with columns |
'type'=>'number', |
Correct fix how to display this field (as column), not always displayed |
'category_id' => array('title'=> LAN_ID, 'type' => 'number', 'width' =>'5%', 'forced'=> TRUE, 'readonly'=>TRUE),
Admin UI Title
Plugin title for Admin UI
It is done from 2 parts:
$pluginTitle
and menu caption
'caption'=> _LINKSWAITINGVAL,
Example how to build your own title that looks similar like core one if you want it a different way for edit mode (if edit mode is not in the menu):
public function __construct($request, $response, $params = array()) { $action = $_GET['action']; $this->pluginTitle = _WEBLINKSADMIN; if($action == 'edit') { $this->pluginTitle .= ' <span class="fa fa-angle-double-right e-breadcrumb"></span> '._LINKVALIDATION; } parent::__construct($request, $response, $params = array()); }
Custom options
'type' => 'method',
Add
function options($parms, $value, $id, $attributes)
{
For more info look at githubSync plugin.