Short description of method actionInstall

@access public
@author Jerome Bogaerts, <jerome.bogaerts@tudor.lu>
@return void
420697
public function actionInstall()
    {
       
        $extensionId = $this->options['extension']; // ID of the extension to install.
        $importLocalData = $this->options['data']; // Import local data (local.rdf) or not ?
        try{
            // Retrieve the extension's information.
            $this->outVerbose("Locating extension '${extensionId}'...");
            $extensionManager = common_ext_ExtensionsManager::singleton();
            $ext = $extensionManager->getExtensionById($extensionId);
            $this->outVerbose("Extension located.");
            
            try{
                // Install the extension.
                $this->outVerbose("Installing extension '${extensionId}'...");
                $installer = new tao_install_ExtensionInstaller($ext, $importLocalData);
                $installer->install();
                $this->outVerbose("Extension successfully installed.");
            }
            catch (common_ext_ForbiddenActionException $e){
                $this->error("A forbidden action was undertaken: " . $e->getMessage() . " .", true);
            }
            catch (common_ext_AlreadyInstalledException $e){
                $this->error("Extension '" . $e->getExtensionId() . "' is already installed.", true);
            }
            catch (common_ext_MissingExtensionException $e){
                $this->error("Extension '" . $extensionId . " is dependant on extension '" . $e->getExtensionId() . "' but is missing. Install '" . $e->getExtensionId() . "' first.", true);
            }
        }
        catch (common_ext_ExtensionException $e){
            $this->error("An unexpected error occured: " . $e->getMessage(), true);
        }
      
    }
10180
public function execute()
	{
		if ($this->output->isInteractive())
		{
			$actions = array('add', 'delete', 'install', 'enable', 'disable');
			$action  = $this->output->getResponse('What do you want to do? ['.implode("|", $actions).']');

			if (in_array($action, $actions))
			{
				$this->$action();
			}
			else
			{
				$this->output->error('Sorry, I don\'t know how to do that.');
			}
		}
		else
		{
			$this->output = $this->output->getHelpOutput();
			$this->help();
			$this->output->render();
			return;
		}
	}
1257370
public function install()
    {
        $this->ensureComponentDirectoryExists();
        $this->updatePackages();
        $this->updateWebpackConfiguration();
        $this->updateBootstrapping();
        $this->updateComponent();
        $this->removeNodeModules();
    }
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'), '#');
    }
1156090
private function mayInstall()
    {
        $destinationDir = $this->file->get(self::SETTING_DESTINATION_DIR) . DIRECTORY_SEPARATOR;

        return !(file_exists($destinationDir . 'composer.json'));
    }
144818
public function actionInstall()
    {
        $this->stdout("Run composer dump-autoload ... ");
        $this->executeCommand('$ composer dump-autoload');
        $this->stdout("[DONE]\n");

        $scriptComponent = $this->getScript();
        if ($scripts = $scriptComponent->getScript('yii2-yiithings-install-cmd')) {
            if ( ! $this->runScripts($scripts)) {
                return 1;
            }
        }

        return 0;
    }
1337037
protected function install()
    {
        $file = $this->download();

        if (empty($file)) {
            return false;
        }

        $result = $this->install->fromZip($file);

        if ($result !== true) {
            $this->setError($result);
            return false;
        }

        if ($this->install->isUpdate()) {
            $this->job['updated']++;
        } else {
            $this->job['inserted']++;
        }

        return true;
    }
1277420
protected function validateInstallerInstall()
    {
        $handlers = $this->install->getHandlers();

        if (count($handlers) >= 2) {

            $options = array();
            foreach ($handlers as $id => $handler) {
                $options[$id] = $handler['title'];
            }

            $input = $this->menu($options, 'default', $this->text('Installation profile (enter a number)'));

            if (!$this->isValidInput($input, 'installer', 'install')) {
                $this->errors();
                $this->validateInstallerInstall();
            }
        }
    }
80625
public function install()
    {
        $this->updatePackages();
        $this->updateBootstrapping();

        $this->filesystem->deleteDirectory(resource_path('assets/js/components'));
        $this->filesystem->delete(resource_path('assets/sass/_variables.scss'));
        $this->filesystem->deleteDirectory(base_path('node_modules'));
        $this->filesystem->deleteDirectory(public_path('css'));
        $this->filesystem->deleteDirectory(public_path('js'));
    }
493100
public function wizardInstallDrupal() {
    if (!$this->getInspector()->isMySqlAvailable()) {
      return FALSE;
    }
    if (!$this->getInspector()->isDrupalInstalled()) {
      $this->logger->warning('Drupal is not installed.');
      $confirm = $this->confirm("Do you want to install Drupal?");
      if ($confirm) {
        $bin = $this->getConfigValue('composer.bin');
        $this->executor
          ->execute("$bin/blt setup")
          ->interactive($this->input()->isInteractive())
          ->run();
        $this->getInspector()->clearState();
      }
    }
  }
1374700
protected function assemble()
    {
        $this->push($this->replace ? 'REPLACE' : 'INSERT');
        $this->pushIgnoreDelayed();
        $this->push('INTO');
        $this->pushTable();
        $this->push('SET');
        $this->pushValues();
        $this->pushOnDuplicateKeyUpdate();
    }
1027467
private function setup_actions() {
		if ( $this->is_theme ) {
			add_action( 'after_setup_theme', function () {
				$this->plugins_loaded();
			} );

			add_action( 'after_switch_theme', function () {
				$this->plugins_loaded();
				$this->main_init();
				$this->filter->do_action( 'app_activated', $this );
			} );

			add_action( 'switch_theme', function () {
				$this->filter->do_action( 'app_deactivated', $this );
			} );
		} else {
			add_action( 'plugins_loaded', function () {
				$this->plugins_loaded();
			} );

			add_action( 'activated_plugin', function ( $plugin ) {
				$this->plugins_loaded();
				$this->main_init();
				if ( $this->define->plugin_base_name === $plugin ) {
					$this->filter->do_action( 'app_activated', $this );
				}
			} );

			add_action( 'deactivated_plugin', function ( $plugin ) {
				if ( $this->define->plugin_base_name === $plugin ) {
					$this->filter->do_action( 'app_deactivated', $this );
				}
			} );
		}

		add_action( 'init', function () {
			$this->main_init();
		}, 1 );
	}
658904
public static function setInstalled()
		{
			// Set App secret
			Yii::$app->config->set(Enum::APP_SECRET, md5(uniqid(time(), TRUE)));

			$param = Configuration::getParam();
			$param[Enum::APP_INSTALLED] = TRUE;
			Configuration::setParam($param);
		}
1281721
public function editInstall()
    {
        $this->controlAccessInstall();
        $this->translation->set($this->install_language, null);
        $this->setTitleEditInstall();

        $requirements = $this->getRequirementsInstall();
        $issues = $this->getRequirementErrorsInstall($requirements);

        $this->setData('issues', $issues);
        $this->setData('requirements', $requirements);
        $this->setData('settings.installer', 'default');
        $this->setData('timezones', gplcart_timezones());
        $this->setData('language', $this->install_language);
        $this->setData('handlers', $this->install->getHandlers());
        $this->setData('languages', $this->getLanguagesInstall());
        $this->setData('severity', $this->getSeverityInstall($issues));
        $this->setData('settings.store.language', $this->install_language);

        $this->submitEditInstall();
        $this->outputEditInstall();
    }
46598
protected function registerInstallCommand()
    {
        $this->app->singleton('command.hstcms.install', function ($app) {
            return new \Huasituo\Hstcms\Console\Commands\HstcmsInstallCommand($app['hstcms']);
        });
        $this->commands('command.hstcms.install');
    }
14350
private function setupAutoloader()
    {
        $this->io->title('Updating autoloaders');
        $result = $this->app['extend.action']['autoload']->execute();
        $this->outputResult($result);
    }
1030128
protected function install()
    {
        $installScripts = array();
        foreach ($this->autoloaderCollection as $dir => $jsonAutoloader) {
            $bundleName = $jsonAutoloader->getBundleName();
            $this->installPackage($dir, $jsonAutoloader);

            // Check if the bundle under exam has attached an ActionManager file
            $actionsManager = $jsonAutoloader->getActionManager();
            if ((!array_key_exists($bundleName, $this->installedBundles) && null !== $actionsManager)) {
                if (null !== $jsonAutoloader->getActionManagerClass()) {
                    $installScripts[$bundleName] = $actionsManager;

                    // Copies the current ActionManager class to app/config/bundles/cache folder
                    // because it must be preserved when a bundle is uninstalled
                    $reflection = new \ReflectionClass($actionsManager);
                    $fileName = $reflection->getFileName();
                    $className = $this->cachePath . '/' . $bundleName . '/' . basename($fileName);
                    $this->filesystem->copy($fileName, $className, true);
                }
            }

            unset($this->installedBundles[$bundleName]);
        }

        $installerScript = $this->scriptFactory->createScript('PreBootInstaller');
        $installerScript->executeActions($installScripts);
    }