Newscoop\Service\Implementation\ThemeServiceLocalFileSystem::loadThemeByPath PHP Метод

loadThemeByPath() защищенный Метод

Load the theme from the provided relative path.
protected loadThemeByPath ( str $themePath ) : Theme
$themePath str The theme relative path.
Результат Newscoop\Entity\Theme The loaded theme.
    protected function loadThemeByPath($themePath)
    {
        $themePath .= $this->themeConfigFileName;
        foreach ($this->findAllThemesConfigPaths() as $id => $rpath) {
            if ($themePath == $rpath) {
                $path = $this->toFullPath($rpath);
                if (file_exists($path)) {
                    $xml = $this->loadXML($path);
                    if ($xml != NULL) {
                        $theme = $this->loadTheme($xml, $id, $rpath);
                        if ($theme != NULL) {
                            return $theme;
                        }
                    }
                }
                return null;
            }
        }
        return null;
    }