protected function getCommandsByMethodEventType($method, $event_type)
    {
        $hooks = ProjectX::getProjectConfig()->getCommandHooks();
        if (empty($hooks)) {
            return [];
        }
        $info = $this->getCommandInfo($method);
        list($command, $action) = explode(':', $info->getName());

        if (!isset($hooks[$command][$action][$event_type])) {
            return [];
        }

        return $hooks[$command][$action][$event_type];
    }
protected function getCommandsByMethodEventType($method, $event_type)
    {
        $hooks = ProjectX::getProjectConfig()->getCommandHooks();
        if (empty($hooks)) {
            return [];
        }
        $info = $this->getCommandInfo($method);
        list($command, $action) = explode(':', $info->getName());

        if (!isset($hooks[$command][$action][$event_type])) {
            return [];
        }

        return $hooks[$command][$action][$event_type];
    }
protected function getCommandsByMethodEventType ( $ method , $ event_type ) { $ hooks = ProjectX :: getProjectConfig ( ) -> getCommandHooks ( ) ; if ( empty ( $ hooks ) ) { return [ ] ; } $ info = $ this -> getCommandInfo ( $ method ) ; list ( $ command , $ action ) = explode ( ':' , $ info -> getName ( ) ) ; if ( ! isset ( $ hooks [ $ command ] [ $ action ] [ $ event_type ] ) ) { return [ ] ; } return $ hooks [ $ command ] [ $ action ] [ $ event_type ] ; }
Get commands by method event type.

@param $method
The executing method.
@param $event_type
The event type that's being executed.

@return array
An array of commands defined in project-x command hooks.
Get commands by method event type .