Crud\Action\BaseAction::handle PHP Method

handle() public method

Based on the requested controller action, decide if we should handle the request or not. By returning false the handling is canceled and the execution flow continues
public handle ( array $args = [] ) : mixed
$args array Arguments
return mixed
    public function handle($args = [])
    {
        if (!$this->enabled()) {
            return false;
        }
        if (!is_array($args)) {
            $args = (array) $args;
        }
        $method = '_' . strtolower($this->_request()->method());
        if (method_exists($this, $method)) {
            $this->_responding = true;
            $this->_controller()->eventManager()->on($this);
            return call_user_func_array([$this, $method], $args);
        }
        if (method_exists($this, '_handle')) {
            $this->_responding = true;
            $this->_controller()->eventManager()->on($this);
            return call_user_func_array([$this, '_handle'], $args);
        }
        throw new NotImplementedException(sprintf('Action %s does not implement a handler for HTTP verb %s', get_class($this), $method));
    }