Component extends Json implements Errorable
FinalYes
Response type for rendering ajax components from action
Table of Contents
Interfaces
- Errorable
Constants
- STATUS_DENIED = 'denied'
- STATUS_ERROR = 'error'
- STATUS_SUCCESS = 'success'
Methods
- __construct() : mixed
- Component constructor.
- getErrorByCode() : Error
- Getting once error with the necessary code.
- getErrors() : array<string|int, Error>
- Getting array of errors.
- send() : mixed
- setData() : mixed
Constants
STATUS_DENIED
public
mixed
STATUS_DENIED
= 'denied'
STATUS_ERROR
public
mixed
STATUS_ERROR
= 'error'
STATUS_SUCCESS
public
mixed
STATUS_SUCCESS
= 'success'
Methods
__construct()
Component constructor.
public
__construct(string $componentName[, string $templateName = '' ][, array<string|int, mixed> $params = [] ][, array<string|int, mixed> $additionalResponseParams = [] ][, array<string|int, mixed> $parentComponent = [] ][, array<string|int, mixed> $functionParams = [] ][, string $status = self::STATUS_SUCCESS ][, ErrorCollection|null $errorCollection = null ]) : mixed
Parameters
- $componentName : string
- $templateName : string = ''
- $params : array<string|int, mixed> = []
- $additionalResponseParams : array<string|int, mixed> = []
- $parentComponent : array<string|int, mixed> = []
- $functionParams : array<string|int, mixed> = []
- $status : string = self::STATUS_SUCCESS
- $errorCollection : ErrorCollection|null = null
getErrorByCode()
Getting once error with the necessary code.
public
getErrorByCode(string $code) : Error
Parameters
- $code : string
-
Code of error.
Return values
ErrorgetErrors()
Getting array of errors.
public
getErrors() : array<string|int, Error>
Return values
array<string|int, Error>send()
public
send() : mixed
setData()
public
setData(mixed $data) : mixed
Parameters
- $data : mixed