X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrush%2Fdrush%2Flib%2FDrush%2FDrupal%2FDrushServiceModifier.php;fp=vendor%2Fdrush%2Fdrush%2Flib%2FDrush%2FDrupal%2FDrushServiceModfier.php;h=14a8a292ee43544b1860358cc44f0ea151872f8d;hp=7d6dec4aacbdb1d5851b9504572478b72bdc39bf;hb=eba34333e3c89f208d2f72fa91351ad019a71583;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae diff --git a/vendor/drush/drush/lib/Drush/Drupal/DrushServiceModfier.php b/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 7d6dec4aa..14a8a292e 100644 --- a/vendor/drush/drush/lib/Drush/Drupal/DrushServiceModfier.php +++ b/vendor/drush/drush/lib/Drush/Drupal/DrushServiceModifier.php @@ -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']); + } }