public function Plugin::onCommand in Drupal 9
Same name and namespace in other branches
- 8 composer/Plugin/Scaffold/Plugin.php \Drupal\Composer\Plugin\Scaffold\Plugin::onCommand()
Pre command event callback.
Parameters
\Composer\Plugin\CommandEvent $event: The Composer command event.
File
- composer/
Plugin/ Scaffold/ Plugin.php, line 121
Class
- Plugin
- Composer plugin for handling drupal scaffold.
Namespace
Drupal\Composer\Plugin\ScaffoldCode
public function onCommand(CommandEvent $event) {
if ($event
->getCommandName() == 'require') {
if ($this->handler) {
throw new \Error('Core Scaffold Plugin handler instantiated too early. See https://www.drupal.org/project/drupal/issues/3104922');
}
$this->requireWasCalled = TRUE;
}
}