Frontend\Core\Engine\Block\Widget::loadConfig PHP 메소드

loadConfig() 공개 메소드

In the config file we have to find disabled actions, the constructor will read the folder and set possible actions Other configurations will be stored in it also.
public loadConfig ( )
    public function loadConfig()
    {
        $configClass = 'Frontend\\Modules\\' . $this->getModule() . '\\Config';
        if ($this->getModule() == 'Core') {
            $configClass = 'Frontend\\Core\\Config';
        }
        // validate if class exists (aka has correct name)
        if (!class_exists($configClass)) {
            throw new FrontendException('The config file ' . $configClass . ' could not be found.');
        }
        // create config-object, the constructor will do some magic
        $this->config = new $configClass($this->getKernel(), $this->getModule());
    }