Baikal\ViewComponentsBundle\Twig\BaikalExtension::config PHP Метод

config() публичный Метод

# Returns the config Service, not the ConfigContainer entity
public config ( $configname = null )
    public function config($configname = null)
    {
        if (!is_null($configname) && !preg_match('/^[a-z0-9\\.]+$/i', $configname)) {
            throw new \Exception("Cannot access requested config in BootCamp Twig extension.");
        }
        if (is_null($configname)) {
            $configname = 'main';
        }
        return $this->container->get('config.' . $configname);
    }