ApplicationActions
in package
Class for basic Crud client
Table of Contents
- $createButton : mixed
- Show create button
- $crudServiceClient : CrudServiceClient
- Service client
- $deleteButton : mixed
- Show delete button
- $entityName : mixed
- Entity nam
- $safeEntityName : mixed
- Entity name for method names
- $updateButton : mixed
- Show update button
- $fields : array<string|int, mixed>
- Fields
- __construct() : mixed
- Constructor
- attachCreateRecord() : void
- Method adds end-point for creating record to the application object
- attachDeleteRecord() : void
- Method adds end-point for deleting record to the application object
- attachListPage() : void
- Method adds end-point for list displaying to the application object
- attachSimpleListPage() : void
- Method adds end-point for list displaying to the application object
- attachUpdateRecord() : void
- Method adds end-point for updating record to the application object
- setServiceClient() : void
- Method sets service client
- addCreateRecordMethod() : void
- Method gets create record controller for the remote service
- addPageParts() : array<string|int, mixed>
- Method adds page parts to the result
- addUpdateRecordMethod() : void
- Method gets update record controller for the remote service.
- createCommonListBuilder() : Common
- List builder creation function
- createSimpleListBuilder() : Simple
- List builder creation function
- getCompiledForm() : array<string|int, mixed>
- Generating form
- loadRoute() : void
- Method adds end-point for list displaying to the application object
Properties
$createButton
Show create button
protected
mixed
$createButton
= false
$crudServiceClient
Service client
protected
CrudServiceClient
$crudServiceClient
= null
$deleteButton
Show delete button
protected
mixed
$deleteButton
= false
$entityName
Entity nam
protected
mixed
$entityName
= ''
$safeEntityName
Entity name for method names
protected
mixed
$safeEntityName
= ''
$updateButton
Show update button
protected
mixed
$updateButton
= false
$fields
Fields
private
array<string|int, mixed>
$fields
= []
Methods
__construct()
Constructor
public
__construct(string $entityName, array<string|int, mixed> $fields[, string $login = '' ][, string $password = '' ]) : mixed
Parameters
- $entityName : string
-
entity name
- $fields : array<string|int, mixed>
-
fields description
- $login : string = ''
-
login
- $password : string = ''
-
password
Return values
mixed —attachCreateRecord()
Method adds end-point for creating record to the application object
public
attachCreateRecord(CommonApplicationInterface &$appObject, array<string|int, mixed> $options) : void
Parameters
- $appObject : CommonApplicationInterface
-
CommonApplicationInterface object
- $options : array<string|int, mixed>
-
options
Return values
void —attachDeleteRecord()
Method adds end-point for deleting record to the application object
public
attachDeleteRecord(CommonApplicationInterface &$appObject, array<string|int, mixed> $options) : void
Parameters
- $appObject : CommonApplicationInterface
-
CommonApplicationInterface object
- $options : array<string|int, mixed>
-
options
Return values
void —attachListPage()
Method adds end-point for list displaying to the application object
public
attachListPage(CommonApplicationInterface &$appObject, array<string|int, mixed> $options) : void
Parameters
- $appObject : CommonApplicationInterface
-
CommonApplicationInterface object
- $options : array<string|int, mixed>
-
options
Return values
void —attachSimpleListPage()
Method adds end-point for list displaying to the application object
public
attachSimpleListPage(CommonApplicationInterface $appObject, array<string|int, mixed> $options) : void
Parameters
- $appObject : CommonApplicationInterface
-
CommonApplicationInterface object
- $options : array<string|int, mixed>
-
options
Return values
void —attachUpdateRecord()
Method adds end-point for updating record to the application object
public
attachUpdateRecord(CommonApplicationInterface &$appObject, array<string|int, mixed> $options) : void
Parameters
- $appObject : CommonApplicationInterface
-
CommonApplicationInterface object
- $options : array<string|int, mixed>
-
options
Return values
void —setServiceClient()
Method sets service client
public
setServiceClient(CrudServiceClientInterface $crudServiceClient) : void
Parameters
- $crudServiceClient : CrudServiceClientInterface
-
CRUD service client
Return values
void —addCreateRecordMethod()
Method gets create record controller for the remote service
private
addCreateRecordMethod(CommonApplicationInterface &$appObject, array<string|int, mixed> $options) : void
Parameters
- $appObject : CommonApplicationInterface
-
CommonApplicationInterface object
- $options : array<string|int, mixed>
-
options
Return values
void —addPageParts()
Method adds page parts to the result
private
addPageParts(array<string|int, mixed> $result, CommonApplicationInterface &$appObject) : array<string|int, mixed>
Parameters
- $result : array<string|int, mixed>
-
view generation result
- $appObject : CommonApplicationInterface
-
application object
Return values
array<string|int, mixed> —compiled view
addUpdateRecordMethod()
Method gets update record controller for the remote service.
private
addUpdateRecordMethod(CommonApplicationInterface &$appObject, array<string|int, mixed> $options) : void
Parameters
- $appObject : CommonApplicationInterface
-
CommonApplicationInterface object
- $options : array<string|int, mixed>
-
options
Return values
void —createCommonListBuilder()
List builder creation function
private
createCommonListBuilder(array<string|int, mixed> $options) : Common
Parameters
- $options : array<string|int, mixed>
Return values
Common —list builder
createSimpleListBuilder()
List builder creation function
private
createSimpleListBuilder(array<string|int, mixed> $options) : Simple
Parameters
- $options : array<string|int, mixed>
Return values
Simple —list
getCompiledForm()
Generating form
private
getCompiledForm([string $type = 'creation' ], int $id) : array<string|int, mixed>
Parameters
- $type : string = 'creation'
-
form type
- $id : int
-
id of the updating record
Return values
array<string|int, mixed> —compiled result
loadRoute()
Method adds end-point for list displaying to the application object
private
loadRoute(CommonApplicationInterface &$appObject, string $route, string $callback, string|array<string|int, mixed> $method) : void
Parameters
- $appObject : CommonApplicationInterface
-
CommonApplicationInterface object
- $route : string
-
route
- $callback : string
-
callback name
- $method : string|array<string|int, mixed>
-
HTTP method name GET or POST