Newscoop\Service\Implementation\ThemeManagementServiceLocal::installTheme PHP Метод

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

public installTheme ( $filePath )
    public function installTheme($filePath)
    {
        Validation::notEmpty($filePath, 'filePath');
        $zip = new \ZipArchive();
        $res = $zip->open($filePath);
        // there was an error with this file upon extraction, so I just deleted it :)
        $zip->deleteName(".");
        if ($res === TRUE) {
            $themePath = $this->getNewThemeFolder(self::FOLDER_UNASSIGNED . '/');
            $zip->extractTo(realpath($this->toFullPath($themePath)));
            $zip->close();
            return true;
        } else {
            return false;
        }
    }