Backend\Modules\Extensions\Actions\InstallTheme::validateInstall PHP Method

validateInstall() private method

Validate if the theme can be installed.
private validateInstall ( )
    private function validateInstall()
    {
        // already installed
        if (BackendExtensionsModel::isThemeInstalled($this->currentTheme)) {
            $this->redirect(BackendModel::createURLForAction('Themes') . '&error=already-installed&var=' . $this->currentTheme);
        }
        // no information file present
        if (!is_file(FRONTEND_PATH . '/Themes/' . $this->currentTheme . '/info.xml')) {
            $this->redirect(BackendModel::createURLForAction('Themes') . '&error=no-information-file&var=' . $this->currentTheme);
        }
    }