24c24 < index 6d70110..df1d674 100644 --- > index 867a375..41536f0 100644 27c27 < @@ -2155,13 +2155,13 @@ function module_implements($hook) { --- > @@ -2146,13 +2146,13 @@ function module_implements($hook) { 33c33 < + * All arguments are passed by value. Use \Drupal::moduleHandler->alter() if --- > + * All arguments are passed by value. Use \Drupal::moduleHandler->alter() if 44c44 < @@ -2174,13 +2174,13 @@ function module_invoke($module, $hook) { --- > @@ -2165,13 +2165,13 @@ function module_invoke($module, $hook) { 50c50 < + * All arguments are passed by value. Use \Drupal::moduleHandler->alter() if --- > + * All arguments are passed by value. Use \Drupal::moduleHandler->alter() if 62c62 < index e70816b..f5001d0 100644 --- > index e70816b..53b4769 100644 81,82c81,82 < + * (optional) If set to TRUE, this function skips calling < + * \Drupal::moduleHandler->alter() on $css, useful when the calling function --- > + * (optional) If set to TRUE, this function skips calling > + * \Drupal::moduleHandler->alter() on $css, useful when the calling function 103,104c103,104 < + * (optional) If set to TRUE, this function skips calling < + * \Drupal::moduleHandler->alter() on $javascript, useful when the calling --- > + * (optional) If set to TRUE, this function skips calling > + * \Drupal::moduleHandler->alter() on $javascript, useful when the calling 292c292 < index dfa3f1d..e4f5f1a 100644 --- > index 61dfb7e..b980aa2 100644 295c295 < @@ -160,7 +160,7 @@ function drupal_mail($module, $key, $to, $langcode, $params = array(), $from = N --- > @@ -158,7 +158,7 @@ function drupal_mail($module, $key, $to, $langcode, $params = array(), $reply = 375c375 < index 96dcd2f..831aff1 100644 --- > index 96dcd2f..b9a9bd4 100644 385,387c385,387 < + // list_themes() triggers a \Drupal::moduleHandler->alter() in maintenance < + // mode, but we can't let themes alter the .info.yml data until we know a < + // theme's base themes. So don't set global $theme until after list_themes() --- > + // list_themes() triggers a \Drupal::moduleHandler->alter() in maintenance > + // mode, but we can't let themes alter the .info.yml data until we know a > + // theme's base themes. So don't set global $theme until after list_themes() 567c567 < index 94373bc..c8c8d51 100644 --- > index 31c6758..cb3d47f 100644 580c580 < index e19408c..28e8e71 100644 --- > index 8b80c56..652c6c2 100644 583c583 < @@ -463,7 +463,7 @@ function field_view_field(ContentEntityInterface $entity, $field_name, $display_ --- > @@ -461,7 +461,7 @@ function field_view_field(ContentEntityInterface $entity, $field_name, $display_ 585c585 < 'langcode' => $display_langcode, --- > 'langcode' => $entity->language()->id, 592,604d591 < diff --git a/core/modules/field/field.multilingual.inc b/core/modules/field/field.multilingual.inc < index d5d058a..6719c31 100644 < --- a/core/modules/field/field.multilingual.inc < +++ b/core/modules/field/field.multilingual.inc < @@ -95,7 +95,7 @@ function field_available_languages($entity_type, FieldInterface $field) { < $langcodes = field_content_languages(); < // Let other modules alter the available languages. < $context = array('entity_type' => $entity_type, 'field' => $field); < - drupal_alter('field_available_languages', $langcodes, $context); < + \Drupal::moduleHandler()->alter('field_available_languages', $langcodes, $context); < $field_langcodes[$entity_type][$field_name] = $langcodes; < } < else { 606c593 < index 7def00e..0a0db23 100644 --- > index 7def00e..4d34759 100644 615c602 < + * not to conflict with the \Drupal::moduleHandler()->alter('field_views_data') --- > + * not to conflict with the \Drupal::moduleHandler()->alter('field_views_data') 717c704 < index 8d1b07c..3e5804b 100644 --- > index 893b8dd..2c50dbf 100644 818c805 < index cabea75..e926d4b 100644 --- > index cabea75..fd1c5d9 100644 832,837c819,824 < + * Note that hooks invoked using \Drupal::moduleHandler->alter() can have < + * multiple variations(such as hook_form_alter() and hook_form_FORM_ID_alter()). < + * \Drupal::moduleHandler->alter() will call all such variants defined by a < + * single module in turn. For the purposes of hook_module_implements_alter(), < + * these variants are treated as a single hook. Thus, to ensure that your < + * implementation of hook_form_FORM_ID_alter() is called at the right time, --- > + * Note that hooks invoked using \Drupal::moduleHandler->alter() can have > + * multiple variations(such as hook_form_alter() and hook_form_FORM_ID_alter()). > + * \Drupal::moduleHandler->alter() will call all such variants defined by a > + * single module in turn. For the purposes of hook_module_implements_alter(), > + * these variants are treated as a single hook. Thus, to ensure that your > + * implementation of hook_form_FORM_ID_alter() is called at the right time, 856c843 < index b3b8ad8..77e7783 100644 --- > index b3b8ad8..ebc08b5 100644 865c852 < + * This is for verifying that \Drupal::moduleHandler->alter()(array(TYPE1, TYPE2), ...) --- > + * This is for verifying that \Drupal::moduleHandler->alter()(array(TYPE1, TYPE2), ...) 878,880c865,867 < + // For \Drupal::moduleHandler()->alter(array('drupal_alter', 'drupal_alter_foo'), ...), < + // make the block module implementations run after all the other modules. Note < + // that when \Drupal::moduleHandler->alter() is called with an array of types, the --- > + // For \Drupal::moduleHandler()->alter(array('drupal_alter', 'drupal_alter_foo'), ...), > + // make the block module implementations run after all the other modules. Note > + // that when \Drupal::moduleHandler->alter() is called with an array of types, the