Skip to content

Commit

Permalink
Fix #3897. Allow multiple topics for commands. (#3907)
Browse files Browse the repository at this point in the history
* Fix #3897. Allow multiple topics for commands.

* Handle notice.

* Switch order.
  • Loading branch information
weitzman committed Feb 5, 2019
1 parent 8252e9a commit 15950ff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Command/DrushCommandInfoAlterer.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ public function alterCommandInfo(CommandInfo $commandInfo, $commandFileInstance)
// Automatically add the help topic for output formatters to
// any command that has any annotations related to output filters
if ($commandInfo->hasAnnotation('filter-output') || $commandInfo->hasAnnotation('field-labels')) {
if ($commandInfo->hasAnnotation('topics')) {
// Topic value may have multiple values separated by a comma.
$values = $commandInfo->getAnnotationList('topics');
$commandInfo->removeAnnotation('topics');
$commandInfo->addAnnotation('topics', $values);
}
$commandInfo->addAnnotation('topics', 'docs:output-formats-filters');
}
}
Expand Down

0 comments on commit 15950ff

Please sign in to comment.