From dc25f9e1553420ee8b55248b4657cce577dffe47 Mon Sep 17 00:00:00 2001 From: Daniel Sasser Date: Wed, 20 Sep 2023 19:19:43 -0700 Subject: [PATCH] VACMS-14793: Do not use the trait yet. We have to wait until the va_gov_menus module is installed. --- .../src/EventSubscriber/FormEventSubscriber.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docroot/modules/custom/va_gov_header_footer/src/EventSubscriber/FormEventSubscriber.php b/docroot/modules/custom/va_gov_header_footer/src/EventSubscriber/FormEventSubscriber.php index 1a8503ed30..3fdc8946a3 100644 --- a/docroot/modules/custom/va_gov_header_footer/src/EventSubscriber/FormEventSubscriber.php +++ b/docroot/modules/custom/va_gov_header_footer/src/EventSubscriber/FormEventSubscriber.php @@ -4,7 +4,6 @@ use Drupal\core_event_dispatcher\Event\Form\FormAlterEvent; use Drupal\core_event_dispatcher\FormHookEvents; -use Drupal\va_gov_menus\Traits\MenuFormAlterTrait; use Drupal\va_gov_user\Service\UserPermsService; use Symfony\Component\EventDispatcher\EventSubscriberInterface; @@ -13,8 +12,6 @@ */ class FormEventSubscriber implements EventSubscriberInterface { - use MenuFormAlterTrait; - /** * The VA user permission service. * @@ -62,7 +59,7 @@ public function formAlter(FormAlterEvent $event): void { $formId = $event->getFormId(); $admin = $this->permsService->hasAdminRole(TRUE); if (in_array($formId, $this->menus) && !$admin) { - $this->hideMenuLinkDescriptionField($form); + $form['description']['#access'] = FALSE; } }