protected function _getControllerActionConfiguration($actionName, $config)
    {
        $realAction = Hash::get($config, 'url.action', $actionName);
        if ($this->_crud()->isActionMapped($realAction)) {
            $action = $this->_action($realAction);
            $class = get_class($action);
            $class = substr($class, strrpos($class, '\\') + 1);

            if ($class === 'DeleteAction') {
                $config += ['method' => 'DELETE'];
            }

            if (!isset($config['scope'])) {
                $config['scope'] = $class === 'AddAction' ? 'table' : $action->scope();
            }
        }

        // apply defaults if necessary
        $scope = isset($config['scope']) ? $config['scope'] : 'entity';
        $method = isset($config['method']) ? $config['method'] : 'GET';

        $title = !empty($config['link_title']) ? $config['link_title'] : Inflector::humanize(Inflector::underscore($actionName));
        $url = ['action' => $realAction];
        if (isset($config['url'])) {
            $url = $config['url'] + $url;
        }

        $actionConfig = [
            'title' => $title,
            'url' => $url,
            'method' => $method,
            'options' => array_diff_key(
                $config,
                array_flip(['method', 'scope', 'link_title', 'url', 'scaffold', 'callback'])
            )
        ];
        if (!empty($config['callback'])) {
            $actionConfig['callback'] = $config['callback'];
        }

        return [$scope, $actionConfig];
    }