public function beforeFilter(Event $event)
{
$this->_action = $this->_controller->request->action;
$this->_request = $this->_controller->request;
if (!isset($this->_controller->dispatchComponents)) {
$this->_controller->dispatchComponents = [];
}
$this->_controller->dispatchComponents['Crud'] = true;
$this->_loadListeners();
$this->trigger('beforeFilter');
}