/** * @param string $directory * * @return Theme */ private function getThemeInfoForPath($directory) { $themeJson = new Json($directory); $theme = new Theme($themeJson->getJsonAttribute('name'), $themeJson->getJsonAttribute('description'), $directory, $themeJson->getJsonAttribute('parent')); $theme->version = $themeJson->getJsonAttribute('version'); $theme->type = ucfirst($themeJson->getJsonAttribute('type')); $theme->changelog = $this->getChangelog($directory); $theme->active = $this->getStatus($theme); return $theme; }