Bolt\Configuration\ResourceManager::setThemePath PHP Method

setThemePath() public method

The theme path is needed before the app has constructed, so this is a shortcut to allow the Application constructor to pre-provide a theme path.
public setThemePath ( array $generalConfig )
$generalConfig array
    public function setThemePath($generalConfig)
    {
        $themeDir = isset($generalConfig['theme']) ? '/' . $generalConfig['theme'] : '';
        $themePath = isset($generalConfig['theme_path']) ? $generalConfig['theme_path'] : '/theme';
        $themeUrl = isset($generalConfig['theme_path']) ? $generalConfig['theme_path'] : '/theme';
        // See if the user has set a theme path otherwise use the default
        if (!isset($generalConfig['theme_path'])) {
            $this->setPath('themepath', $this->getPath('themebase') . $themeDir);
            $this->setUrl('theme', $themeUrl . $themeDir . '/');
        } else {
            $this->setPath('themepath', $this->getPath('rootpath') . $themePath . $themeDir);
            $this->setUrl('theme', $themeUrl . $themeDir . '/');
        }
    }