You are here

public function TypesCommand::addFieldLabels in Purge 8.3

Dynamically add field labels for the purger columns.

@hook init p:types

File

modules/purge_drush/src/Commands/TypesCommand.php, line 51

Class

TypesCommand
List all supported cache invalidation types.

Namespace

Drupal\purge_drush\Commands

Code

public function addFieldLabels(InputInterface $input, AnnotationData $annotationData) {
  if (isset($annotationData['field-labels'])) {
    foreach ($this->purgePurgers
      ->getLabels() as $id => $label) {
      $annotationData['field-labels'] .= sprintf("\n%s: %s", $id, $label);
    }
  }
}