From b30241b11ee3fe43498c922ec310799c65ee27db Mon Sep 17 00:00:00 2001 From: Christia Troyer Date: Mon, 18 Sep 2023 18:33:53 -0700 Subject: [PATCH] VACMS-14793: Move menu form alter trait to menus more centralized menus module --- config/sync/core.extension.yml | 1 + .../src/EventSubscriber/FormEventSubscriber.php | 2 +- .../va_gov_menus/config/schema/va_gov_menus.schema.yml | 8 ++++++++ .../src/Traits/MenuFormAlterTrait.php | 2 +- docroot/modules/custom/va_gov_menus/va_gov_menus.info.yml | 5 +++++ 5 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 docroot/modules/custom/va_gov_menus/config/schema/va_gov_menus.schema.yml rename docroot/modules/custom/{va_gov_header_footer => va_gov_menus}/src/Traits/MenuFormAlterTrait.php (88%) create mode 100644 docroot/modules/custom/va_gov_menus/va_gov_menus.info.yml diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index cd149d56c1d..851382789e9 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -262,6 +262,7 @@ module: va_gov_magichead: 0 va_gov_media: 0 va_gov_menu_access: 0 + va_gov_menus: 0 va_gov_migrate: 0 va_gov_multilingual: 0 va_gov_multilingual_tmgmt: 0 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 38840b6b06d..1a8503ed309 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,7 @@ use Drupal\core_event_dispatcher\Event\Form\FormAlterEvent; use Drupal\core_event_dispatcher\FormHookEvents; -use Drupal\va_gov_header_footer\Traits\MenuFormAlterTrait; +use Drupal\va_gov_menus\Traits\MenuFormAlterTrait; use Drupal\va_gov_user\Service\UserPermsService; use Symfony\Component\EventDispatcher\EventSubscriberInterface; diff --git a/docroot/modules/custom/va_gov_menus/config/schema/va_gov_menus.schema.yml b/docroot/modules/custom/va_gov_menus/config/schema/va_gov_menus.schema.yml new file mode 100644 index 00000000000..7df4aabc0f4 --- /dev/null +++ b/docroot/modules/custom/va_gov_menus/config/schema/va_gov_menus.schema.yml @@ -0,0 +1,8 @@ +# Schema for the configuration files of the VA.gov Menus Helper module. +va_gov_menus.settings: + type: config_object + label: 'VA.gov Menus Helper settings' + mapping: + example: + type: string + label: 'Example' diff --git a/docroot/modules/custom/va_gov_header_footer/src/Traits/MenuFormAlterTrait.php b/docroot/modules/custom/va_gov_menus/src/Traits/MenuFormAlterTrait.php similarity index 88% rename from docroot/modules/custom/va_gov_header_footer/src/Traits/MenuFormAlterTrait.php rename to docroot/modules/custom/va_gov_menus/src/Traits/MenuFormAlterTrait.php index 1805e05a817..802bfe149be 100644 --- a/docroot/modules/custom/va_gov_header_footer/src/Traits/MenuFormAlterTrait.php +++ b/docroot/modules/custom/va_gov_menus/src/Traits/MenuFormAlterTrait.php @@ -1,6 +1,6 @@