Install a new theme.

@return void
489201
public function install()
    {
        if ($this->request->data()) {
            $task = false;
            $uploadError = false;

            if (isset($this->request->data['download'])) {
                $task = (bool)WebShellDispatcher::run("Installer.plugins install -s \"{$this->request->data['url']}\" --theme -a");
            } elseif (isset($this->request->data['file_system'])) {
                $task = (bool)WebShellDispatcher::run("Installer.plugins install -s \"{$this->request->data['path']}\" --theme -a");
            } else {
                $uploader = new PackageUploader($this->request->data['file']);
                if ($uploader->upload()) {
                    $task = (bool)WebShellDispatcher::run('Installer.plugins install -s "' . $uploader->dst() . '" --theme -a');
                } else {
                    $uploadError = true;
                    $this->Flash->set(__d('system', 'Plugins installed but some errors occur'), [
                        'element' => 'System.installer_errors',
                        'params' => ['errors' => $uploader->errors(), 'type' => 'warning'],
                    ]);
                }
            }

            if ($task) {
                $this->Flash->success(__d('system', 'Theme successfully installed!'));
                $this->redirect($this->referer());
            } elseif (!$task && !$uploadError) {
                $this->Flash->set(__d('system', 'Theme could not be installed'), [
                    'element' => 'System.installer_errors',
                    'params' => ['errors' => WebShellDispatcher::output()],
                ]);
            }
        }

        $this->title(__d('system', 'Install Theme'));
        $this->Breadcrumb
            ->push('/admin/system/themes')
            ->push(__d('system', 'Install new theme'), '#');
    }
1099221
public function install()
    {
        $sql = 'CREATE TABLE IF NOT EXISTS `'.self::TABLENAME.'` (`id` varchar(32) NOT NULL, PRIMARY KEY (`id`), `session_data` longtext NULL, `access` int(10) NULL);';

        return $this->app['db']
            ->raw($sql)
            ->execute() instanceof PDOStatement;
    }
760733
public function reload_theme() {
        if (!is_null($this->_theme)) {
            $this->_theme = theme_config::load($this->_theme->name);
        }
    }
44122
public function theme()
    {
        $keys = [
            'Theme_id'
        ];

        /** @var ThemeSettingsTable $ThemeSettings */
        $ThemeSettings = $this->loadModel('Wasabi/Cms.ThemeSettings');

        $settings = $ThemeSettings->getKeyValues(new GeneralSetting(), $keys);

        if ($this->request->is('post') && !empty($this->request->data)) {
            $settings = $ThemeSettings->newEntity($this->request->data);
            if (!$settings->errors()) {
                if ($ThemeSettings->saveKeyValues($settings, $keys)) {
                    $this->Flash->success(__d('wasabi_cms', 'The theme settings have been updated.'));
                    $this->redirect(['action' => 'theme']);
                    return;
                } else {
                    $this->Flash->error($this->dbErrorMessage);
                }
            } else {
                $this->Flash->error($this->formErrorMessage);
            }
        }
        $this->set([
            'settings' => $settings,
            'themes' => ThemeManager::getThemesForSelect()
        ]);
    }
206890
public function setTheme($theme)
    {
        if (!is_null($this->theme)) {
            $this->resolved && $this->resetViewPaths();

            $this->dispatcher->fire("antares.theme.unset: {$this->theme}");
            $this->dispatcher->fire(new ThemeUnset($this->theme));
        }


        $this->theme = $theme;
        $this->dispatcher->fire("antares.theme.set: {$this->theme}");
        $this->dispatcher->fire(new ThemeSet($this->theme));

        if ($this->resolved) {
            $this->resolved = false;
            $this->resolving();
        }
    }
312095
public static function loadThemes()
    {
        $themesFolder = new Folder(ROOT . DS . 'themes');
        $themes = $themesFolder->read()[0];
        $loader = require ROOT . DS . 'vendor' . DS . 'autoload.php';
        foreach ($themes as $theme) {
            $loader->addPsr4('WasabiTheme\\' . $theme . '\\', [$themesFolder->path . DS . $theme . DS . 'src']);
            Plugin::load('WasabiTheme/' . $theme, [
                'path' => $themesFolder->path . DS . $theme . DS,
                'bootstrap' => true,
                'routes' => false
            ]);
        }
    }
793381
public function registerTheme()
	{
		$this->app->singleton('theme', function($app)
		{
			return new Theme($app['config'], $app['events'], $app['view'], $app['asset'], $app['files'], $app['breadcrumb'], $app['manifest']);
		});

		$this->app->alias('theme', 'Facuz\Theme\Contracts\Theme');
	}
55352
public function install()
    {
        $this->controlAccessInstall();

        if ($this->getParam()) {
            $this->validateFastInstall();
        } else {
            $this->validateWizardInstall();
        }

        $this->processInstall();
        $this->output();
    }
257141
public static function init() {

		if ( self::can_switch_themes() ) {
			add_action( 'admin_bar_menu', array( __CLASS__, 'admin_bar_menu' ), 90 );
			add_action( 'wp_ajax_tts_set_theme', array( __CLASS__, 'set_theme' ) );
		}

		load_plugin_textdomain( 'toolbar-theme-switcher', false, dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/lang' );
	}
943405
public static function install()
    {
        static::updatePackages();
        static::updateBootstrapping();

        tap(new Filesystem, function ($filesystem) {
            $filesystem->deleteDirectory(resource_path('js/components'));
            $filesystem->delete(resource_path('sass/_variables.scss'));
            $filesystem->deleteDirectory(base_path('node_modules'));
            $filesystem->deleteDirectory(public_path('css'));
            $filesystem->deleteDirectory(public_path('js'));
        });
    }
1365061
private function mirrorThemes()
    {
        $filesystem = $this->app['filesystem'];
        $themes = $filesystem->find()
            ->directories()
            ->in('root://vendor/bolt/themes')
            ->depth(0)
        ;

        $confirm = $this->io->confirm('Continuing will copy/update the example themes into your installation, overwriting older copies. Is this OK?');
        if (!$confirm) {
            $this->io->note('Skipping theme copy');

            return;
        }

        foreach ($themes as $theme) {
            /** @var Directory $theme */
            $origin = $theme->getFullPath();
            $target = 'themes://' . $theme->getFilename();

            $this->io->title('Installing theme: ' . $theme->getFilename());
            $filesystem->mirror($origin, $target, ['override' => true]);
            $this->io->success('');
        }
    }
324625
public function install()
    {
        if (file_exists($this->destination . '/' . $this->filename)
            || !$this->isBitbucket()
        ) {
            return;
        }


        $files = [
            __DIR__ . '/../../templates/mapping/files',
            sprintf(
                __DIR__ . '/../../templates/mapping/pipelines/%s',
                $this->typeResolver->resolve()
            )
        ];

        $reader = new UnixFileMappingReader(
            __DIR__ . '/../../templates/files',
            getcwd(),
            ...$files
        );
        
        foreach ($reader as $mapping) {
            $this->fileInstaller->installFile($mapping);
            $this->io->write(
                sprintf(
                    '<info>Installed:</info> %s',
                    $mapping->getRelativeDestination()
                )
            );
        }
    }
545276
public function up() {
        $admin = Role::admin();

        $acl = app('antares.acl')->make('antares');
        $memory = app('antares.memory')->make('component');
        $acl->attach($memory);
        $acl->roles()->attach([$admin->name]);

        $presentationActions = [
            'Admin List', //users
            'Preview Themes', 'Preview Frontend', //themes
            'Roles List', //roles
        ];

        $crudActions = [
            'User Create', 'User Update', 'User Delete', //users
            'Activate Theme', 'Upload Theme', 'Install Theme', //themes
            'Create Role', 'Edit Role', 'Delete Role', //roles            
            'Properties', 'Properties Update', //action properties
            'Manage Roles', 'Manage Acl', 'Manage Settings', //global            
        ];

        $acl->actions()->attach(array_merge($presentationActions, $crudActions));
        $acl->allow($admin->name, array_merge($presentationActions, $crudActions));
    }
761603
public function addAutomaticTheme()
    {
        $nbTheme = 0;
        $theme = new ThemeEntity();

        $directoryThemes = $theme->getBasePath();

        $nbTheme = $this->checkAssets($directoryThemes, $nbTheme);

        return $nbTheme;
    }
413564
public function install()
    {
        parent::install();
        $driver = ORM::getManager()->getDriver();
        $driver->createTable(ORM::getTable($this, 'Menu'));
    }
67214
function install()
    {
        if (! $this->brew->hasInstalledPhp()) {
            $this->brew->ensureInstalled('php', [], $this->taps);
        }

        $this->files->ensureDirExists('/usr/local/var/log', user());

        $this->updateConfiguration();

        $this->restart();
    }
257226
public function apply()
    {
        if (!($this->config->hasKey(self::HEIGHT) && $this->config->hasKey(self::WIDTH))) {
            return;
        }

        add_theme_support('custom-logo', [
            'height'      => $this->config->getKey(self::HEIGHT),
            'width'       => $this->config->getKey(self::WIDTH),
            'flex-height' => $this->config->hasKey(self::FLEX_HEIGHT) ? $this->config->getKey(self::FLEX_HEIGHT) : true,
            'flex-width'  => $this->config->hasKey(self::FLEX_WIDTH) ? $this->config->getKey(self::FLEX_WIDTH) : true,
        ]);

        add_filter('genesis_seo_title', [$this, 'inlineLogoMarkup'], 10, 3);

        if (false === $this->config->getKey(self::SITE_DESCRIPTION)) {
            add_filter('genesis_attr_site-description', [$this, 'hideSiteDescription']);
        }
    }