PHP 클래스 Crud\Action\BaseAction

Licensed under The MIT License For full copyright and license information, please see the LICENSE.txt
상속: extends Crud\Core\Object
파일 보기 프로젝트 열기: friendsofcake/crud

보호된 프로퍼티들

프로퍼티 타입 설명
$_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