class ComposerPluginImplementsScaffoldEvents
Same name in other branches
- 11.x core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/composer-plugin-implements-scaffold-events/src/ComposerPluginImplementsScaffoldEvents.php \Drupal\Tests\fixture\Composer\Plugin\ComposerPluginImplementsScaffoldEvents
A fixture composer plugin implement Drupal scaffold events.
Hierarchy
- class \Drupal\Tests\fixture\Composer\Plugin\ComposerPluginImplementsScaffoldEvents implements \Composer\Plugin\PluginInterface, \Composer\EventDispatcher\EventSubscriberInterface
Expanded class hierarchy of ComposerPluginImplementsScaffoldEvents
File
-
core/
tests/ Drupal/ Tests/ Composer/ Plugin/ Scaffold/ fixtures/ composer-plugin-implements-scaffold-events/ src/ ComposerPluginImplementsScaffoldEvents.php, line 17
Namespace
Drupal\Tests\fixture\Composer\PluginView source
class ComposerPluginImplementsScaffoldEvents implements PluginInterface, EventSubscriberInterface {
/**
* {@inheritdoc}
*/
public static function getSubscribedEvents() : array {
return [
Handler::PRE_DRUPAL_SCAFFOLD_CMD => 'preDrupalScaffoldCmd',
Handler::POST_DRUPAL_SCAFFOLD_CMD => 'postDrupalScaffoldCmd',
];
}
/**
* Implements pre Drupal scaffold cmd.
*/
public static function preDrupalScaffoldCmd(Event $event) : void {
$event->getIO()
->write('Hello preDrupalScaffoldCmd');
}
/**
* Implements post Drupal scaffold cmd.
*/
public static function postDrupalScaffoldCmd(Event $event) : void {
$event->getIO()
->write('Hello postDrupalScaffoldCmd');
}
/**
* {@inheritdoc}
*/
public function activate(Composer $composer, IOInterface $io) : void {
}
/**
* {@inheritdoc}
*/
public function deactivate(Composer $composer, IOInterface $io) : void {
}
/**
* {@inheritdoc}
*/
public function uninstall(Composer $composer, IOInterface $io) : void {
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
ComposerPluginImplementsScaffoldEvents::activate | public | function | |
ComposerPluginImplementsScaffoldEvents::deactivate | public | function | |
ComposerPluginImplementsScaffoldEvents::getSubscribedEvents | public static | function | |
ComposerPluginImplementsScaffoldEvents::postDrupalScaffoldCmd | public static | function | Implements post Drupal scaffold cmd. |
ComposerPluginImplementsScaffoldEvents::preDrupalScaffoldCmd | public static | function | Implements pre Drupal scaffold cmd. |
ComposerPluginImplementsScaffoldEvents::uninstall | public | function |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.