You are here

public function CommandGcuSubscriber::__construct in Update helper 8

Same name and namespace in other branches
  1. 2.x modules/update_helper_checklist/src/Events/CommandGcuSubscriber.php \Drupal\update_helper_checklist\Events\CommandGcuSubscriber::__construct()

CommandGcuSubscriber constructor.

Parameters

\Drupal\update_helper_checklist\Generator\ConfigurationUpdateGenerator $generator: Code generator service.

\Drupal\Console\Utils\TranslatorManager $translator_manager: Translator manager service.

\Drupal\update_helper_checklist\UpdateChecklist $update_checklist: Update checklist service.

File

modules/update_helper_checklist/src/Events/CommandGcuSubscriber.php, line 79

Class

CommandGcuSubscriber
Subscriber for "generate:configuration:update" command.

Namespace

Drupal\update_helper_checklist\Events

Code

public function __construct(ConfigurationUpdateGenerator $generator, TranslatorManager $translator_manager, UpdateChecklist $update_checklist) {
  $this->generator = $generator;
  $this->translatorManager = $translator_manager;
  $this->updateChecklist = $update_checklist;

  // Init required options for this subscriber to work.
  $translator_manager
    ->addResourceTranslationsByExtension('update_helper_checklist', 'module');
  $this->generator
    ->addSkeletonDir(__DIR__ . '/../../templates/console');
}