PHP Class Crud\Action\BaseAction

Licensed under The MIT License For full copyright and license information, please see the LICENSE.txt
Inheritance: extends Crud\Core\Object
Afficher le fichier Open project: friendsofcake/crud

Protected Properties

Свойство Type Description
$_defaultConfig array Default configuration
$_responding boolean Check if the current action is responding to a request or not

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
_deriveResourceName ( ) : string Derive resource name

Method Details

_deriveResourceName() protected méthode

Derive resource name
protected _deriveResourceName ( ) : string
Résultat string

disable() public méthode

Disable the Crud action
public disable ( ) : void
Résultat void

enable() public méthode

Enable the Crud action
public enable ( ) : void
Résultat void

enabled() public méthode

Test if a Crud action is enabled or not
public enabled ( ) : boolean
Résultat boolean

handle() public méthode

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
Résultat mixed

implementedEvents() public méthode

Additional auxiliary events emitted if certain traits are loaded
public implementedEvents ( ) : array
Résultat array

message() public méthode

return the config for a given message type
public message ( string $type, array $replacements = [] ) : array
$type string Message type.
$replacements array Replacements
Résultat array

publishSuccess() public méthode

Set "success" variable for view.
public publishSuccess ( Cake\Event\Event $event ) : boolean | null
$event Cake\Event\Event Event
Résultat boolean | null

redirectConfig() public méthode

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
Résultat mixed

resourceName() public méthode

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
Résultat string

responding() public méthode

Getter for $_responding
public responding ( ) : boolean
Résultat boolean

scope() public méthode

Usually it's 'table' or 'entity'
public scope ( ) : string
Résultat string

setFlash() public méthode

Wrapper for FlashComponent::set()
public setFlash ( string $type, Crud\Event\Subject $subject ) : void
$type string Message type
$subject Crud\Event\Subject Event subject
Résultat void

subjectEntityKey() public méthode

Get entity key
public subjectEntityKey ( ) : string
Résultat string

Property Details

$_defaultConfig protected_oe property

Default configuration
protected array $_defaultConfig
Résultat array

$_responding protected_oe property

Check if the current action is responding to a request or not
protected bool $_responding
Résultat boolean