Skip to content
Snippets Groups Projects
Commit 668ba96c authored by catch's avatar catch
Browse files

Issue #3513000 by nicxvan: Delete comment module form alters calling getFieldUIPageTitle

parent a436b76c
Branches
Tags
4 merge requests!5423Draft: Resolve #3329907 "Test2",!3478Issue #3337882: Deleted menus are not removed from content type config,!2964Issue #2865710 : Dependencies from only one instance of a widget are used in display modes,!579Issue #2230909: Simple decimals fail to pass validation
Pipeline #450275 passed with warnings
Pipeline: drupal

#450278

    ......@@ -7,7 +7,6 @@
    use Drupal\Core\StringTranslation\StringTranslationTrait;
    use Drupal\user\UserInterface;
    use Drupal\user\RoleInterface;
    use Drupal\Core\Form\FormStateInterface;
    use Drupal\Core\Entity\FieldableEntityInterface;
    use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
    use Drupal\Core\Entity\EntityInterface;
    ......@@ -223,17 +222,6 @@ public function nodeViewAlter(array &$build, EntityInterface $node, EntityViewDi
    }
    }
    /**
    * Implements hook_form_FORM_ID_alter() for field_ui_field_storage_add_form.
    */
    #[Hook('form_field_ui_field_storage_add_form_alter')]
    public function formFieldUiFieldStorageAddFormAlter(&$form, FormStateInterface $form_state) : void {
    $route_match = \Drupal::routeMatch();
    if ($form_state->get('entity_type_id') == 'comment' && $route_match->getParameter('commented_entity_type')) {
    $form['#title'] = \Drupal::service('comment.manager')->getFieldUIPageTitle($route_match->getParameter('commented_entity_type'), $route_match->getParameter('field_name'));
    }
    }
    /**
    * Implements hook_field_info_entity_type_ui_definitions_alter().
    */
    ......@@ -244,28 +232,6 @@ public function fieldInfoEntityTypeUiDefinitionsAlter(array &$ui_definitions, st
    }
    }
    /**
    * Implements hook_form_FORM_ID_alter().
    */
    #[Hook('form_field_ui_form_display_overview_form_alter')]
    public function formFieldUiFormDisplayOverviewFormAlter(&$form, FormStateInterface $form_state) : void {
    $route_match = \Drupal::routeMatch();
    if ($form['#entity_type'] == 'comment' && $route_match->getParameter('commented_entity_type')) {
    $form['#title'] = \Drupal::service('comment.manager')->getFieldUIPageTitle($route_match->getParameter('commented_entity_type'), $route_match->getParameter('field_name'));
    }
    }
    /**
    * Implements hook_form_FORM_ID_alter().
    */
    #[Hook('form_field_ui_display_overview_form_alter')]
    public function formFieldUiDisplayOverviewFormAlter(&$form, FormStateInterface $form_state) : void {
    $route_match = \Drupal::routeMatch();
    if ($form['#entity_type'] == 'comment' && $route_match->getParameter('commented_entity_type')) {
    $form['#title'] = \Drupal::service('comment.manager')->getFieldUIPageTitle($route_match->getParameter('commented_entity_type'), $route_match->getParameter('field_name'));
    }
    }
    /**
    * Implements hook_entity_storage_load().
    *
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment