PHP Класс Crud\Action\BaseAction

Licensed under The MIT License For full copyright and license information, please see the LICENSE.txt
Наследование: extends Crud\Core\Object
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$_defaultConfig array Default configuration
$_responding boolean Check if the current action is responding to a request or not

Открытые методы

Метод Описание
disable ( ) : void Disable the Crud action
enable ( ) : void Enable the Crud action
enabled ( ) : boolean Test if a Crud action is enabled or not
handle ( array $args = [] ) : mixed Handle callback
implementedEvents ( ) : array Additional auxiliary events emitted if certain traits are loaded
message ( string $type, array $replacements = [] ) : array return the config for a given message type
publishSuccess ( Cake\Event\Event $event ) : boolean | null Set "success" variable for view.
redirectConfig ( null | string $name = null, null | array $config = null ) : mixed Change redirect configuration
resourceName ( string | null $value = null ) : string Return the human name of the model
responding ( ) : boolean Getter for $_responding
scope ( ) : string Get the action scope
setFlash ( string $type, Crud\Event\Subject $subject ) : void Wrapper for FlashComponent::set()
subjectEntityKey ( ) : string Get entity key

Защищенные методы

Метод Описание
_deriveResourceName ( ) : string Derive resource name

Описание методов

_deriveResourceName() защищенный Метод

Derive resource name
protected _deriveResourceName ( ) : string
Результат string

disable() публичный Метод

Disable the Crud action
public disable ( ) : void
Результат void

enable() публичный Метод

Enable the Crud action
public enable ( ) : void
Результат void

enabled() публичный Метод

Test if a Crud action is enabled or not
public enabled ( ) : boolean
Результат boolean

handle() публичный Метод

Based on the requested controller action, decide if we should handle the request or not. By returning false the handling is canceled and the execution flow continues
public handle ( array $args = [] ) : mixed
$args array Arguments
Результат mixed

implementedEvents() публичный Метод

Additional auxiliary events emitted if certain traits are loaded
public implementedEvents ( ) : array
Результат array

message() публичный Метод

return the config for a given message type
public message ( string $type, array $replacements = [] ) : array
$type string Message type.
$replacements array Replacements
Результат array

publishSuccess() публичный Метод

Set "success" variable for view.
public publishSuccess ( Cake\Event\Event $event ) : boolean | null
$event Cake\Event\Event Event
Результат boolean | null

redirectConfig() публичный Метод

If both $name and $config is empty all redirection rules will be returned. If $name is provided and $config is null, the named redirection configuration is returned. If both $name and $config is provided, the configuration is changed for the named rule. $config should contain the following keys: - type : name of the reader - key : the key to read inside the reader - url : the URL to redirect to
public redirectConfig ( null | string $name = null, null | array $config = null ) : mixed
$name null | string Name of the redirection rule
$config null | array Redirection configuration
Результат mixed

resourceName() публичный Метод

By default it uses Inflector::humanize, but can be changed using the "name" configuration property
public resourceName ( string | null $value = null ) : string
$value string | null Name to set
Результат string

responding() публичный Метод

Getter for $_responding
public responding ( ) : boolean
Результат boolean

scope() публичный Метод

Usually it's 'table' or 'entity'
public scope ( ) : string
Результат string

setFlash() публичный Метод

Wrapper for FlashComponent::set()
public setFlash ( string $type, Crud\Event\Subject $subject ) : void
$type string Message type
$subject Crud\Event\Subject Event subject
Результат void

subjectEntityKey() публичный Метод

Get entity key
public subjectEntityKey ( ) : string
Результат string

Описание свойств

$_defaultConfig защищенное свойство

Default configuration
protected array $_defaultConfig
Результат array

$_responding защищенное свойство

Check if the current action is responding to a request or not
protected bool $_responding
Результат boolean