FOF30\Configuration\Domain\Views::getConfig PHP Method

getConfig() protected method

Internal method to return the a configuration option for the view. These are equivalent to $config array options passed to the Controller
protected getConfig ( string $view, &$configuration, array $params, mixed $default = null ) : string
$view string The view for which we will be fetching a task map
$params array Extra options; key 0 defines the option variable we want to fetch
$default mixed Default option; null if not defined
return string The setting for the requested option
    protected function getConfig($view, &$configuration, $params, $default = null)
    {
        $ret = $default;
        $config = array();
        if (isset($configuration['views']['*']['config'])) {
            $config = $configuration['views']['*']['config'];
        }
        if (isset($configuration['views'][$view]['config'])) {
            $config = array_merge($config, $configuration['views'][$view]['config']);
        }
        if (empty($params) || empty($params[0])) {
            return $config;
        }
        if (isset($config[$params[0]])) {
            $ret = $config[$params[0]];
        }
        return $ret;
    }