Yaffs site version 1.1
[yaffs-website] / vendor / drush / drush / lib / Drush / Drupal / DrushServiceModifier.php
similarity index 65%
rename from vendor/drush/drush/lib/Drush/Drupal/DrushServiceModfier.php
rename to vendor/drush/drush/lib/Drush/Drupal/DrushServiceModifier.php
index 7d6dec4aacbdb1d5851b9504572478b72bdc39bf..14a8a292ee43544b1860358cc44f0ea151872f8d 100644 (file)
@@ -6,7 +6,7 @@ use Drush\Log\LogLevel;
 use Drupal\Core\DependencyInjection\ServiceModifierInterface;
 use Drupal\Core\DependencyInjection\ContainerBuilder;
 
-class DrushServiceModfier implements ServiceModifierInterface
+class DrushServiceModifier implements ServiceModifierInterface
 {
     /**
      * @inheritdoc
@@ -19,4 +19,15 @@ class DrushServiceModfier implements ServiceModifierInterface
         $container->register('drush.service.consolidationcommands', 'Drush\Command\ServiceCommandlist');
         $container->addCompilerPass(new FindCommandsCompilerPass('drush.service.consolidationcommands', 'consolidation.commandhandler'));
     }
+  /**
+   * Checks existing service definitions for the presence of modification.
+   *
+   * @param $container_definition
+   *   Cached container definition
+   * @return bool
+   */
+    public function check($container_definition) {
+      return isset($container_definition['services']['drush.service.consolecommands']) &&
+        isset($container_definition['services']['drush.service.consolidationcommands']);
+    }
 }