From 812720ec4f3dea32d54943c657f1e9e645258aaa Mon Sep 17 00:00:00 2001 From: Christia Troyer Date: Fri, 15 Sep 2023 03:45:08 -0700 Subject: [PATCH] TEMP: SAVE POINT --- config/sync/core.extension.yml | 1 - .../va_gov_header_footer.services.yml | 6 ------ .../src/EventSubscriber/FormEventSubscriber.php | 2 +- docroot/modules/custom/va_gov_home/va_gov_home.info.yml | 2 +- .../src/EventSubscriber/FormEventSubscriber.php | 9 +++++---- .../src/Traits/MenuFormAlter.php | 2 +- .../va_gov_menus.info.yml} | 0 .../custom/va_gov_menus/va_gov_menus.services.yml | 6 ++++++ 8 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 docroot/modules/custom/va_gov_header_footer/va_gov_header_footer.services.yml rename docroot/modules/custom/{va_gov_header_footer => va_gov_menus}/src/EventSubscriber/FormEventSubscriber.php (85%) rename docroot/modules/custom/{va_gov_header_footer => va_gov_menus}/src/Traits/MenuFormAlter.php (97%) rename docroot/modules/custom/{va_gov_header_footer/va_gov_header_footer.info.yml => va_gov_menus/va_gov_menus.info.yml} (100%) create mode 100644 docroot/modules/custom/va_gov_menus/va_gov_menus.services.yml diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index 690f71df45f..21a36cee3be 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -252,7 +252,6 @@ module: va_gov_github: 0 va_gov_govdelivery: 0 va_gov_graphql: 0 - va_gov_header_footer: 0 va_gov_help_center: 0 va_gov_links: 0 va_gov_live_field_migration: 0 diff --git a/docroot/modules/custom/va_gov_header_footer/va_gov_header_footer.services.yml b/docroot/modules/custom/va_gov_header_footer/va_gov_header_footer.services.yml deleted file mode 100644 index fde2e55e527..00000000000 --- a/docroot/modules/custom/va_gov_header_footer/va_gov_header_footer.services.yml +++ /dev/null @@ -1,6 +0,0 @@ -services: - va_gov_header_footer.event_subscriber: - class: Drupal\va_gov_header_footer\EventSubscriber\FormEventSubscriber - arguments: ['@va_gov_user.user_perms'] - tags: - - { name: event_subscriber } diff --git a/docroot/modules/custom/va_gov_home/src/EventSubscriber/FormEventSubscriber.php b/docroot/modules/custom/va_gov_home/src/EventSubscriber/FormEventSubscriber.php index ff652b35564..010f0a1b515 100644 --- a/docroot/modules/custom/va_gov_home/src/EventSubscriber/FormEventSubscriber.php +++ b/docroot/modules/custom/va_gov_home/src/EventSubscriber/FormEventSubscriber.php @@ -4,7 +4,7 @@ use Drupal\core_event_dispatcher\Event\Form\FormAlterEvent; use Drupal\core_event_dispatcher\FormHookEvents; -use Drupal\va_gov_header_footer\Traits\MenuFormAlter; +use Drupal\va_gov_menus\Traits\MenuFormAlter; use Drupal\va_gov_user\Service\UserPermsService; use Symfony\Component\EventDispatcher\EventSubscriberInterface; diff --git a/docroot/modules/custom/va_gov_home/va_gov_home.info.yml b/docroot/modules/custom/va_gov_home/va_gov_home.info.yml index 37e554b1462..6e625a012c5 100644 --- a/docroot/modules/custom/va_gov_home/va_gov_home.info.yml +++ b/docroot/modules/custom/va_gov_home/va_gov_home.info.yml @@ -4,5 +4,5 @@ description: Provides custom logic for the va.gov home page. package: Custom core_version_requirement: ^9 || ^10 dependencies: - - va_gov_user - core_event_dispatcher + - va_gov_user diff --git a/docroot/modules/custom/va_gov_header_footer/src/EventSubscriber/FormEventSubscriber.php b/docroot/modules/custom/va_gov_menus/src/EventSubscriber/FormEventSubscriber.php similarity index 85% rename from docroot/modules/custom/va_gov_header_footer/src/EventSubscriber/FormEventSubscriber.php rename to docroot/modules/custom/va_gov_menus/src/EventSubscriber/FormEventSubscriber.php index 82cc90b497e..35507864191 100644 --- a/docroot/modules/custom/va_gov_header_footer/src/EventSubscriber/FormEventSubscriber.php +++ b/docroot/modules/custom/va_gov_menus/src/EventSubscriber/FormEventSubscriber.php @@ -1,10 +1,10 @@ getForm(); $formId = $event->getFormId(); - $admin = $this->permsService->hasAdminRole(TRUE); - if (in_array($formId, $this->menus) && $admin) { + if (in_array($formId, $this->menus)) { +// $admin = $this->permsService->hasAdminRole(TRUE); +// if (in_array($formId, $this->menus) && $admin) { $this->hideMenuLinkDescriptionField($form); } } diff --git a/docroot/modules/custom/va_gov_header_footer/src/Traits/MenuFormAlter.php b/docroot/modules/custom/va_gov_menus/src/Traits/MenuFormAlter.php similarity index 97% rename from docroot/modules/custom/va_gov_header_footer/src/Traits/MenuFormAlter.php rename to docroot/modules/custom/va_gov_menus/src/Traits/MenuFormAlter.php index 769309e6469..36adf8f494e 100644 --- a/docroot/modules/custom/va_gov_header_footer/src/Traits/MenuFormAlter.php +++ b/docroot/modules/custom/va_gov_menus/src/Traits/MenuFormAlter.php @@ -1,6 +1,6 @@