projects
/
yaffs-website
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website]
/
vendor
/
drupal
/
console-core
/
src
/
Command
/
Generate
/
SiteAliasCommand.php
diff --git
a/vendor/drupal/console-core/src/Command/Generate/SiteAliasCommand.php
b/vendor/drupal/console-core/src/Command/Generate/SiteAliasCommand.php
index 9ba3e2df7e7234623dd10e1f555894ff2c706e04..835afe165ca59de233927754396c190447f06306 100644
(file)
--- a/
vendor/drupal/console-core/src/Command/Generate/SiteAliasCommand.php
+++ b/
vendor/drupal/console-core/src/Command/Generate/SiteAliasCommand.php
@@
-77,6
+77,12
@@
class SiteAliasCommand extends Command
$this->trans('commands.generate.site.alias.description')
)
->setHelp($this->trans('commands.generate.site.alias.help'))
$this->trans('commands.generate.site.alias.description')
)
->setHelp($this->trans('commands.generate.site.alias.help'))
+ ->addOption(
+ 'site',
+ null,
+ InputOption::VALUE_NONE,
+ $this->trans('commands.generate.site.alias.options.site')
+ )
->addOption(
'name',
null,
->addOption(
'name',
null,
@@
-147,6
+153,7
@@
class SiteAliasCommand extends Command
InputInterface $input,
OutputInterface $output
) {
InputInterface $input,
OutputInterface $output
) {
+ $site = $input->getOption('site');
$name = $input->getOption('name');
if (!$name) {
$sites = $this->configurationManager->getSites();
$name = $input->getOption('name');
if (!$name) {
$sites = $this->configurationManager->getSites();
@@
-269,6
+276,10
@@
class SiteAliasCommand extends Command
}
$directory = $input->getOption('directory');
}
$directory = $input->getOption('directory');
+ if ($site && $this->drupalFinder->getComposerRoot()) {
+ $directory = $this->drupalFinder->getComposerRoot() . '/console/';
+ }
+
if (!$directory) {
$directory = $this->getIo()->choice(
$this->trans('commands.generate.site.alias.questions.directory'),
if (!$directory) {
$directory = $this->getIo()->choice(
$this->trans('commands.generate.site.alias.questions.directory'),
@@
-286,6
+297,11
@@
class SiteAliasCommand extends Command
InputInterface $input,
OutputInterface $output
) {
InputInterface $input,
OutputInterface $output
) {
+ $site = $input->getOption('site');
+ $directory = $input->getOption('directory');
+ if ($site && $this->drupalFinder->isValidDrupal()) {
+ $directory = $this->drupalFinder->getComposerRoot() . '/console/';
+ }
$this->generator->generate(
[
'name' => $input->getOption('name'),
$this->generator->generate(
[
'name' => $input->getOption('name'),
@@
-297,7
+313,7
@@
class SiteAliasCommand extends Command
'port' => $input->getOption('port'),
'user' => $input->getOption('user'),
'host' => $input->getOption('host'),
'port' => $input->getOption('port'),
'user' => $input->getOption('user'),
'host' => $input->getOption('host'),
- 'directory' => $
input->getOption('directory')
+ 'directory' => $
directory
]
);
}
]
);
}