diff --git a/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterEventListenersPass.php b/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterEventListenersPass.php index d9e8242..21a3650 100644 --- a/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterEventListenersPass.php +++ b/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterEventListenersPass.php @@ -38,6 +38,7 @@ public function process(ContainerBuilder $container) { list($drupal, $provider, $rest) = explode('\\', $class, 3); + // If set in the module configuration, we use the module weight. if ($drupal == 'Drupal' && isset($module_parameter[$provider]['weight'])) { $weight = $module_parameter[$provider]['weight']; } @@ -47,8 +48,8 @@ public function process(ContainerBuilder $container) { $weights[$id] = $weight; } - // Sort the IDs first by module weight, than by full classname. Using the - // full classname takes into account the module name automatically. + // Sort the IDs first by module weight, then by full class name. Using the + // full class name takes into account the module name automatically. usort($ids, function($a, $b) use ($weights, $id_class_map) { if ($weights[$a] !== $weights[$b]) { return $weights[$a] < $weights[$b] ? -1 : 1; @@ -69,7 +70,6 @@ public function process(ContainerBuilder $container) { } // Get all subscribed events. - // @todo Implement sorting by module weight and class name. foreach ($class::getSubscribedEvents() as $event_name => $params) { if (is_string($params)) { $priority = 0; diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index da9cf2e..dbde707 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -84,9 +84,7 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface { protected $moduleList; /** - * List of available modules and installation profiles. - * - * Its a list of extensions keyed by module name. + * List of available module and profile extension objects keyed by name. * * @var \Drupal\Core\Extension\Extension[] */