class SiteInstallCommands extends DrushCommands implements SiteAliasManagerAwareInterface (View source)

Traits

SiteAliasManagerAwareTrait
ProcessManagerAwareTrait
LoggerAwareTrait
IO
ConfigAwareTrait

Constants

REQ

OPT

EXIT_SUCCESS

EXIT_FAILURE

Methods

getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct()

No description

LoggerInterface
logger()

Returns a logger object.

io()

Override Robo's IO function with our custom style.

printFile(string $file)

Print the contents of a file.

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

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

from ExecTrait
static 
programExists($program)

No description

from ExecTrait
static 
getEditor()

No description

from ExecTrait
install(array $profile, $options = ['db-url' => self::REQ, 'db-prefix' => self::REQ, 'db-su' => self::REQ, 'db-su-pw' => self::REQ, 'account-name' => 'admin', 'account-mail' => 'admin@example.com', 'site-mail' => 'admin@example.com', 'account-pass' => self::REQ, 'locale' => 'en', 'site-name' => 'Drush Site-Install', 'site-pass' => self::REQ, 'sites-subdir' => self::REQ, 'config-dir' => self::REQ, 'existing-config' => false])

Install Drupal along with modules/themes/configuration/profile.

determineProfile($profile, $options, $class_loader)

No description

post($result, CommandData $commandData)

Post installation, run the configuration import.

hasConfigFiles($config)

Check to see if there are any .yml files in the provided config directory.

validate(CommandData $commandData)

No description

pre(CommandData $commandData)

Perform setup tasks before installation.

getSitesSubdirFromUri($root, $uri)

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

static 
getVersion()

No description

serverGlobals($drupal_base_url)

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

validateConfigDir(CommandData $commandData, $directory)

Assure that a config directory exists and is populated.

Details

DrushConfig getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct()

protected LoggerInterface logger()

Returns a logger object.

Return Value

LoggerInterface

protected io()

Override Robo's IO function with our custom style.

protected printFile(string $file)

Print the contents of a file.

Parameters

string $file Full path to a file.

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

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

$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
bool $port
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 programExists($program)

Parameters

$program

static getEditor()

install(array $profile, $options = ['db-url' => self::REQ, 'db-prefix' => self::REQ, 'db-su' => self::REQ, 'db-su-pw' => self::REQ, 'account-name' => 'admin', 'account-mail' => 'admin@example.com', 'site-mail' => 'admin@example.com', 'account-pass' => self::REQ, 'locale' => 'en', 'site-name' => 'Drush Site-Install', 'site-pass' => self::REQ, 'sites-subdir' => self::REQ, 'config-dir' => self::REQ, 'existing-config' => false])

Install Drupal along with modules/themes/configuration/profile.

Parameters

array $profile
$options

protected determineProfile($profile, $options, $class_loader)

Parameters

$profile
$options
$class_loader

post($result, CommandData $commandData)

Post installation, run the configuration import.

Parameters

$result
CommandData $commandData

protected hasConfigFiles($config)

Check to see if there are any .yml files in the provided config directory.

Parameters

$config

validate(CommandData $commandData)

Parameters

CommandData $commandData

pre(CommandData $commandData)

Perform setup tasks before installation.

Parameters

CommandData $commandData

protected getSitesSubdirFromUri($root, $uri)

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

Parameters

$root
$uri

static getVersion()

serverGlobals($drupal_base_url)

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

protected validateConfigDir(CommandData $commandData, $directory)

Assure that a config directory exists and is populated.

Parameters

CommandData $commandData
$directory

Exceptions

Exception