Crud\Action\BaseAction::redirectConfig PHP Method

redirectConfig() public method

If both $name and $config is empty all redirection rules will be returned. If $name is provided and $config is null, the named redirection configuration is returned. If both $name and $config is provided, the configuration is changed for the named rule. $config should contain the following keys: - type : name of the reader - key : the key to read inside the reader - url : the URL to redirect to
public redirectConfig ( null | string $name = null, null | array $config = null ) : mixed
$name null | string Name of the redirection rule
$config null | array Redirection configuration
return mixed
    public function redirectConfig($name = null, $config = null)
    {
        if ($name === null && $config === null) {
            return $this->config('redirect');
        }
        $path = sprintf('redirect.%s', $name);
        if ($config === null) {
            return $this->config($path);
        }
        return $this->config($path, $config);
    }