PHP Class 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.
Inheritance: extends Object, implements CakeEventListener
Mostrar archivo Open project: nodesagency/Platform-Crud-Plugin Class Usage Examples

Public Methods

Method Description
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

Method Details

afterDelete() public method

Called after any delete() action
public afterDelete ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
return void

afterFind() public method

After find callback
public afterFind ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
return void

afterListRelated() public method

- 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.
return void

afterPaginate() public method

Called right after any paginate() method
public afterPaginate ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
return void

afterSave() public method

Called after any save() method
public afterSave ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
return void

beforeDelete() public method

Called before any delete() action
public beforeDelete ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
return void

beforeFind() public method

Called before any find() on the model
public beforeFind ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
return void

beforeListRelated() public method

$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.
return void

beforePaginate() public method

Called right before any paginate() method
public beforePaginate ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
return void

beforeRedirect() public method

Called before any CRUD redirection
public beforeRedirect ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
return void

beforeRender() public method

CakeEvent $event The CakePHP CakeEvent object.
public beforeRender ( CakeEvent $event ) : void
$event CakeEvent
return void

beforeSave() public method

Called before a record is saved in add or edit actions
public beforeSave ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
return void

implementedEvents() public method

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

init() public method

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.
return void

invalidId() public method

Called if the ID format validation failed
public invalidId ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
return void

recordNotFound() public method

Called if a find() did not return any records
public recordNotFound ( CakeEvent $event ) : void
$event CakeEvent The CakePHP CakeEvent object.
return void

setFlash() public method

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.
return void