Control
in package
AbstractYes
Universal control interface for interaction with records
Table of Contents
Properties
Methods
- __construct() : mixed
- addAction() : void
- Form specific
- addTab() : void
- Form specific
- getCss() : array<string, mixed>
- Gets css for controller, form and plugins
- getErrors() : array<string|int, string>
- getFormById() : Form|null
- getForms() : array<string|int, Form>
- Returns list of all forms
- getScript() : array<string, mixed>
- Gets javascript for current controller
- setOrder() : void
- Table specific
- setPrimary() : void
- Set primary form
- setTableColumns() : void
- Table specific
- setUp() : void
- createFormList() : array<string|int, Form>
- Creates list of all forms
- getAssetScript() : array<string, mixed>
- Get list of all javascript files required by used forms
- updateInjections() : void
- Carry out dependency injections in form and inputs
Properties
$primary
public
Form
$primary
base form
$db
protected
SQL
$db
$fileApi
protected
FileApi
$fileApi
$nav
protected
AdminNavigation
$nav
Methods
__construct()
public
__construct(SQL $db, AdminNavigation $nav, FileApi $fileApi) : mixed
Parameters
- $db : SQL
- $nav : AdminNavigation
- $fileApi : FileApi
addAction()
Form specific
public
addAction(mixed $inputs, mixed $targets[, mixed|null $else = null ][, bool $begin = true ]) : void
Parameters
- $inputs : mixed
- $targets : mixed
- $else : mixed|null = null
- $begin : bool = true
addTab()
Form specific
public
addTab(string $name, array<string|int, Form>|Form $forms) : void
Parameters
getCss()
Gets css for controller, form and plugins
public
getCss() : array<string, mixed>
Return values
array<string, mixed>getErrors()
public
getErrors() : array<string|int, string>
Return values
array<string|int, string>getFormById()
public
getFormById(int $id) : Form|null
Parameters
- $id : int
Return values
Form|nullgetForms()
Returns list of all forms
public
getForms() : array<string|int, Form>
Return values
array<string|int, Form>getScript()
Gets javascript for current controller
public
getScript([string|null $jParent = null ]) : array<string, mixed>
Parameters
- $jParent : string|null = null
Return values
array<string, mixed>setOrder()
Table specific
public
setOrder(array<string|int, Input>|Input $inputs, array<string|int, string>|string $directions) : void
Parameters
setPrimary()
Set primary form
public
setPrimary(Form $primary) : void
Parameters
- $primary : Form
setTableColumns()
Table specific
public
setTableColumns(array<string|int, Input> $columns) : void
Parameters
- $columns : array<string|int, Input>
setUp()
public
setUp([bool|null $foreign = null ][, bool $edit = true ]) : void
Parameters
- $foreign : bool|null = null
- $edit : bool = true
createFormList()
Creates list of all forms
protected
createFormList(Form $form) : array<string|int, Form>
Parameters
- $form : Form
Return values
array<string|int, Form>getAssetScript()
Get list of all javascript files required by used forms
protected
getAssetScript(bool $edit) : array<string, mixed>
Parameters
- $edit : bool
Return values
array<string, mixed>updateInjections()
Carry out dependency injections in form and inputs
protected
updateInjections(Form $form) : void
Parameters
- $form : Form