PHP Класс CrudListener, Platform-Crud-Plugin

All callbacks are defined here for good measure Copyright 2010-2012, Nodes ApS. (http://www.nodesagency.com/) Licensed under The MIT License Redistributions of files must retain the above copyright notice.
Наследование: extends Object, implements CakeEventListener
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
afterDelete ( CakeEvent $event ) : void Called after any delete() action
afterFind ( CakeEvent $event ) : void After find callback
afterListRelated ( CakeEvent $event ) : void Called after related records list for a model is fetched $event->subject will contain the following properties that can be modified:
afterPaginate ( CakeEvent $event ) : void Called right after any paginate() method
afterSave ( CakeEvent $event ) : void Called after any save() method
beforeDelete ( CakeEvent $event ) : void Called before any delete() action
beforeFind ( CakeEvent $event ) : void Called before any find() on the model
beforeListRelated ( CakeEvent $event ) : void Called before related records list for a model is fetched.
beforePaginate ( CakeEvent $event ) : void Called right before any paginate() method
beforeRedirect ( CakeEvent $event ) : void Called before any CRUD redirection
beforeRender ( CakeEvent $event ) : void Called before cake's own render()
beforeSave ( CakeEvent $event ) : void Called before a record is saved in add or edit actions
implementedEvents ( ) : array Returns a list of all events that will fire in the controller during it's life cycle.
init ( CakeEvent $event ) : void Initialize method
invalidId ( CakeEvent $event ) : void Called if the ID format validation failed
recordNotFound ( CakeEvent $event ) : void Called if a find() did not return any records
setFlash ( CakeEvent $event ) : void Called before any CakeSession::setFlash

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

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

Called after any delete() action
public afterDelete ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
Результат void

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

After find callback
public afterFind ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
Результат void

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

- items: result from calling find('list') - viewVar: Variable name to be set on the view with items as value - model: Model instance, the model to be used for fiding the list or records
public afterListRelated ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
Результат void

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

Called right after any paginate() method
public afterPaginate ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
Результат void

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

Called after any save() method
public afterSave ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
Результат void

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

Called before any delete() action
public beforeDelete ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
Результат void

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

Called before any find() on the model
public beforeFind ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
Результат void

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

$event->subject will contain the following properties that can be modified: - query: An array with options for find('list') - model: Model instance, the model to be used for fiding the list or records
public beforeListRelated ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
Результат void

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

Called right before any paginate() method
public beforePaginate ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
Результат void

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

Called before any CRUD redirection
public beforeRedirect ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
Результат void

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

CakeEvent $event The CakePHP CakeEvent object.
public beforeRender ( CakeEvent $event ) : void
$event CakeEvent
Результат void

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

Called before a record is saved in add or edit actions
public beforeSave ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
Результат void

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

You can override this function to add you own listener callbacks
public implementedEvents ( ) : array
Результат array

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

Called before any other method in the decorator Just set the arguments as instance properties for easier access later
public init ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
Результат void

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

Called if the ID format validation failed
public invalidId ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
Результат void

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

Called if a find() did not return any records
public recordNotFound ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
Результат void

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

Subject contains the following keys you can modify: - message - element = 'default', - params = array() - key = 'flash'
public setFlash ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
Результат void