Skip to content

Commit

Permalink
[console] Rename method getDrupalMessages to addDrupalMessages. (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmolivas committed Feb 13, 2018
1 parent 6abeb9e commit f998ed7
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ public function doRun(InputInterface $input, OutputInterface $output)
$output
);

// Propogate Drupal messages.
$this->getDrupalMessages($messageManager);
// Propagate Drupal messages.
$this->addDrupalMessages($messageManager);

if ($this->showMessages($input)) {
$messages = $messageManager->getMessages();
Expand Down Expand Up @@ -851,25 +851,9 @@ public function getContainer()
}

/**
* Finds a command by name or alias.
*
* @param string $name A command name or a command alias
*
* @return mixed A Command instance
*
* Override parent find method to avoid name collisions with automatically
* generated command abbreviations.
* Command name validation was previously done at doRun method.
*/
public function find($name)
{
return $this->get($name);
}

/**
* Gets Drupal system messages.
* Add Drupal system messages.
*/
protected function getDrupalMessages($messageManager) {
protected function addDrupalMessages($messageManager) {
if (function_exists('drupal_get_messages')) {
$drupalMessages = drupal_get_messages();
foreach ($drupalMessages as $type => $messages) {
Expand Down Expand Up @@ -901,4 +885,20 @@ protected function getMessageMethod($type) {

return $methodName;
}

/**
* Finds a command by name or alias.
*
* @param string $name A command name or a command alias
*
* @return mixed A Command instance
*
* Override parent find method to avoid name collisions with automatically
* generated command abbreviations.
* Command name validation was previously done at doRun method.
*/
public function find($name)
{
return $this->get($name);
}
}

0 comments on commit f998ed7

Please sign in to comment.