protected function _event($action, $data = [])
    {
        $_event = new Event('Controller.PostTypes.' . $this->type['name'] . '.' . $action, $this, $data);
        $this->eventManager()->dispatch($_event);
    }
protected function _event($action, $data = [])
    {
        $_event = new Event('Controller.PostTypes.' . $this->type['name'] . '.' . $action, $this, $data);
        $this->eventManager()->dispatch($_event);
    }
protected function _event ( $ action , $ data = [ ] ) { $ _event = new Event ( 'Controller.PostTypes.' . $ this -> type [ 'name' ] . '.' . $ action , $ this , $ data ) ; $ this -> eventManager ( ) -> dispatch ( $ _event ) ; }
Fires an event with the PostType-prefix.

@param string $action Current action.
@param array $data data that should be sent with the event.
@return void
Fires an event with the PostType - prefix .