Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Plugin.php

function 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\Scaffold

Code

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;
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal