public function _init() {
		parent::_init();
		if (!$model = $this->_model) {
			throw new ConfigException("`'model'` option needs to be defined.");
		}
		$behavior = $this;
		$model::applyFilter('save', function($self, $params, $chain) use ($behavior) {
			if ($behavior->invokeMethod('_beforeSave', [$params])) {
				return $chain->next($self, $params, $chain);
			}
		});

		$model::applyFilter('delete', function($self, $params, $chain) use ($behavior) {
			if ($behavior->invokeMethod('_beforeDelete', [$params])) {
				return $chain->next($self, $params, $chain);
			}
		});
	}
public function _init() {
		parent::_init();
		if (!$model = $this->_model) {
			throw new ConfigException("`'model'` option needs to be defined.");
		}
		$behavior = $this;
		$model::applyFilter('save', function($self, $params, $chain) use ($behavior) {
			if ($behavior->invokeMethod('_beforeSave', [$params])) {
				return $chain->next($self, $params, $chain);
			}
		});

		$model::applyFilter('delete', function($self, $params, $chain) use ($behavior) {
			if ($behavior->invokeMethod('_beforeDelete', [$params])) {
				return $chain->next($self, $params, $chain);
			}
		});
	}
public function _init ( ) { parent :: _init ( ) ; if ( ! $ model = $ this -> _model ) { throw new ConfigException ( "`'model'` option needs to be defined." ) ; } $ behavior = $ this ; $ model :: applyFilter ( 'save' , function ( $ self , $ params , $ chain ) use ( $ behavior ) { if ( $ behavior -> invokeMethod ( '_beforeSave' , [ $ params ] ) ) { return $ chain -> next ( $ self , $ params , $ chain ) ; } } ) ; $ model :: applyFilter ( 'delete' , function ( $ self , $ params , $ chain ) use ( $ behavior ) { if ( $ behavior -> invokeMethod ( '_beforeDelete' , [ $ params ] ) ) { return $ chain -> next ( $ self , $ params , $ chain ) ; } } ) ; }
Initializer function called by the constructor unless the constructor `'init'` flag is set
to `false`.

@see lithium\core\Object
@throws ConfigException
Initializer function called by the constructor unless the constructor init flag is set to false .