Skip to content
Snippets Groups Projects
Commit c638818b authored by Kristiaan Van den Eynde's avatar Kristiaan Van den Eynde
Browse files

Issue #3526229 by kristiaanvandeneynde: Remove FormAlter hook attribute as...

Issue #3526229 by kristiaanvandeneynde: Remove FormAlter hook attribute as it's been removed from core
parent e8c566dd
No related branches found
No related tags found
1 merge request!236Remove FormAlter and replace with Hook
Pipeline #504615 failed
......@@ -6,7 +6,7 @@ namespace Drupal\group\Hook;
use Drupal\Core\Entity\EntityFormInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Hook\Attribute\FormAlter;
use Drupal\Core\Hook\Attribute\Hook;
use Drupal\Core\Render\Element;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\StringTranslation\TranslationInterface;
......@@ -32,7 +32,7 @@ final class FormHooks {
/**
* Implements hook_form_FORM_ID_alter().
*/
#[FormAlter('block_form')]
#[Hook('form_block_form_alter')]
public function formBlockFormAlter(array &$form, FormStateInterface $form_state, string $form_id): void {
if (isset($form['visibility']['group_type'])) {
$form['visibility_tabs']['#attached']['library'][] = 'group/block';
......@@ -46,7 +46,7 @@ final class FormHooks {
/**
* Implements hook_form_alter().
*/
#[FormAlter]
#[Hook('form_alter')]
public function formAlter(array &$form, FormStateInterface $form_state, string $form_id): void {
// GroupRelationshipController::createForm() tends to load entity forms for
// adding entities to a group. We need to add or alter the submit handlers
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment