PHP 클래스 TranslationsListener, Platform-Crud-Plugin

Handles all translations inside Crud and friends Copyright 2010-2012, Nodes ApS. (http://www.nodesagency.com/) Licensed under The MIT License Redistributions of files must retain the above copyright notice.
또한 보기: http://book.cakephp.org/2.0/en/controllers/components.html#Component
상속: implements CakeEventListener
파일 보기 프로젝트 열기: nodesagency/Platform-Crud-Plugin 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_config array Configurations for TranslationsEvent
$_crud CrudComponent Crud Component reference
$_defaults array domain the translation domain to be used name the name to use in flash messages - defaults to the model's name property event-name the remaining array keys are event-name indexed arrays with the flash-message settings for each event
$_subject CrudSubject Crud Event subject

공개 메소드들

메소드 설명
__construct ( CrudSubject $subject ) : void Class constructor
config ( mixed $key = null, mixed $value = null ) : TranslationsEvent Generic config method
getDefaults ( )
implementedEvents ( ) : array Returns a list of all events that will fire in the controller during it's life cycle.
setFlash ( CakeEvent $event ) : void SetFlash Crud Event callback

메소드 상세

__construct() 공개 메소드

Class constructor
public __construct ( CrudSubject $subject ) : void
$subject CrudSubject
리턴 void

config() 공개 메소드

If $key is an array and $value is empty, $key will be merged directly with $this->_config If $key is a string it will be passed into Hash::insert
public config ( mixed $key = null, mixed $value = null ) : TranslationsEvent
$key mixed
$value mixed
리턴 TranslationsEvent

getDefaults() 공개 메소드

public getDefaults ( )

implementedEvents() 공개 메소드

You can override this function to add you own listener callbacks
public implementedEvents ( ) : array
리턴 array

setFlash() 공개 메소드

SetFlash Crud Event callback
public setFlash ( CakeEvent $event ) : void
$event CakeEvent
리턴 void

프로퍼티 상세

$_config 보호되어 있는 프로퍼티

Configurations for TranslationsEvent
protected array $_config
리턴 array

$_crud 보호되어 있는 프로퍼티

Crud Component reference
protected CrudComponent $_crud
리턴 CrudComponent

$_defaults 보호되어 있는 프로퍼티

domain the translation domain to be used name the name to use in flash messages - defaults to the model's name property event-name the remaining array keys are event-name indexed arrays with the flash-message settings for each event
protected array $_defaults
리턴 array

$_subject 보호되어 있는 프로퍼티

Crud Event subject
protected CrudSubject $_subject
리턴 CrudSubject