final class SiteInstallCommand extends Command (View source)

Traits

A copy of \Drupal\Core\DependencyInjection\AutowireTrait with first params' type hint changed.

Constants

NAME

Properties

protected $uri from  ExecTrait

Methods

static 
create(ContainerInterface $container)

Instantiates a new instance of the implementing class using autowiring.

bool
startBrowser(string|null $uri = null, int $sleep = 0, int|null $port = null, string|bool $browser = false)

Starts a background browser/tab for the current site or a specified URL.

static bool
programExists($program)

No description

static string
getEditor(string|null $editor = null)

No description

__construct(BootstrapManager $bootstrapManager, SiteAliasManagerInterface $siteAliasManager, ClassLoader $autoloader, DrushConfig $drushConfig, LoggerInterface $logger)

No description

void
configure()

No description

int
execute(InputInterface $input, OutputInterface $output)

No description

void
validate(InputInterface $input, DrushStyle $io)

No description

void
pre(InputInterface $input, DrushStyle $io)

No description

void
doExecute(InputInterface $input, OutputInterface $output, DrushStyle $io)

No description

array
determineRecipeOrProfile($recipeOrProfile, $options)

Determine if the passed parameter is a recipe directory, or a profile name.

isValidProfileName(string $profile)

Determine whether the provided profile name meets naming conventions.

bool
validateRecipe(string $recipe)

Validates a user provided recipe.

string|bool
determineProfile($profile, $options)

No description

void
taskCallback($install_state)

No description

void
serverGlobals($drupal_base_url)

Fake the necessary HTTP headers that the Drupal installer still needs:

array
getLoginLinks(UserInterface $account)

No description

getSitesSubdirFromUri($root, $uri)

Determine an appropriate site subdir name to use for the provided uri.

Details

static create(ContainerInterface $container)

Instantiates a new instance of the implementing class using autowiring.

Parameters

ContainerInterface $container

The service container this instance should use.

bool startBrowser(string|null $uri = null, int $sleep = 0, int|null $port = null, string|bool $browser = false)

Starts a background browser/tab for the current site or a specified URL.

Uses a non-blocking Process call, so Drush execution will continue.

Parameters

string|null $uri

Optional URI or site path to open in browser. If omitted, or if a site path is specified, the current site home page uri will be prepended if the site's hostname resolves.

int $sleep
int|null $port
string|bool $browser

Return Value

bool

TRUE if browser was opened. FALSE if browser was disabled by the user or a default browser could not be found.

static bool programExists($program)

No description

Parameters

$program

Return Value

bool

static string getEditor(string|null $editor = null)

No description

Parameters

string|null $editor

Return Value

string

__construct(BootstrapManager $bootstrapManager, SiteAliasManagerInterface $siteAliasManager, ClassLoader $autoloader, DrushConfig $drushConfig, LoggerInterface $logger)

No description

Parameters

BootstrapManager $bootstrapManager
SiteAliasManagerInterface $siteAliasManager
ClassLoader $autoloader
DrushConfig $drushConfig
LoggerInterface $logger

protected void configure()

No description

Return Value

void

int execute(InputInterface $input, OutputInterface $output)

No description

Parameters

InputInterface $input
OutputInterface $output

Return Value

int

protected void validate(InputInterface $input, DrushStyle $io)

No description

Parameters

InputInterface $input
DrushStyle $io

Return Value

void

protected void pre(InputInterface $input, DrushStyle $io)

No description

Parameters

InputInterface $input
DrushStyle $io

Return Value

void

protected void doExecute(InputInterface $input, OutputInterface $output, DrushStyle $io)

No description

Parameters

InputInterface $input
OutputInterface $output
DrushStyle $io

Return Value

void

protected array determineRecipeOrProfile($recipeOrProfile, $options)

Determine if the passed parameter is a recipe directory, or a profile name.

Parameters

$recipeOrProfile
$options

Return Value

array

protected isValidProfileName(string $profile)

Determine whether the provided profile name meets naming conventions.

We do not check for reserved names; if a profile name might be valid, we will pass it through to Drupal and let the system tell us if it is not allowed.

Parameters

string $profile

protected bool validateRecipe(string $recipe)

Validates a user provided recipe.

Parameters

string $recipe

The path to the recipe to validate.

Return Value

bool

TRUE if the recipe exists, FALSE if not.

protected string|bool determineProfile($profile, $options)

No description

Parameters

$profile
$options

Return Value

string|bool

void taskCallback($install_state)

No description

Parameters

$install_state

Return Value

void

protected void serverGlobals($drupal_base_url)

Fake the necessary HTTP headers that the Drupal installer still needs:

No description

Parameters

UserInterface $account

Return Value

array

protected getSitesSubdirFromUri($root, $uri)

Determine an appropriate site subdir name to use for the provided uri.

Parameters

$root
$uri