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
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$_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