class ImportCompleteCommand in Tome 8
Contains the tome:import-complete command.
@internal
Hierarchy
- class \Drupal\tome_base\CommandBase extends \Symfony\Component\Console\Command\Command uses ExecutableFinderTrait, ProcessTrait
- class \Drupal\tome_sync\Commands\ImportCompleteCommand
Expanded class hierarchy of ImportCompleteCommand
1 string reference to 'ImportCompleteCommand'
- tome_sync.services.yml in modules/
tome_sync/ tome_sync.services.yml - modules/tome_sync/tome_sync.services.yml
1 service uses ImportCompleteCommand
File
- modules/
tome_sync/ src/ Commands/ ImportCompleteCommand.php, line 17
Namespace
Drupal\tome_sync\CommandsView source
class ImportCompleteCommand extends CommandBase {
/**
* The event dispatcher.
*
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
/**
* Constructs an ImportCompleteCommand instance.
*
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher.
*/
public function __construct(EventDispatcherInterface $event_dispatcher) {
parent::__construct();
$this->eventDispatcher = $event_dispatcher;
}
/**
* {@inheritdoc}
*/
protected function configure() {
$this
->setName('tome:import-complete')
->setDescription('Triggers an import complete event.')
->setHidden(TRUE);
}
/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output) {
$this->eventDispatcher
->dispatch(TomeSyncEvents::IMPORT_ALL, new Event());
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CommandBase:: |
protected | property | The current executable path. | |
CommandBase:: |
protected | property | The IO decorator. | |
CommandBase:: |
protected | function | ||
CommandBase:: |
protected | function |
Returns the IO decorator, for reporting errors. Overrides ProcessTrait:: |
|
ExecutableFinderTrait:: |
protected | function | Finds an executable string for the current process. | |
ImportCompleteCommand:: |
protected | property | The event dispatcher. | |
ImportCompleteCommand:: |
protected | function | ||
ImportCompleteCommand:: |
protected | function | ||
ImportCompleteCommand:: |
public | function | Constructs an ImportCompleteCommand instance. | |
ProcessTrait:: |
protected | function | Displays errors using the IO component. | |
ProcessTrait:: |
protected | function | Runs a single command and outputs errors if encountered. | |
ProcessTrait:: |
protected | function | Runs commands with concurrency. |