You are here

public function FormAlter::appliesUserRegistrationPasswordFormAlter in Form mode manager 8.2

Evaluate if current form can applies the user_registrationpassword hook.

Parameters

string $formId: The Form ID.

string $dynamicFormId: The Form ID calculated via routing entity_form parameters.

Return value

bool True if the hook can be applied of False if not.

1 call to FormAlter::appliesUserRegistrationPasswordFormAlter()
FormAlter::userRegistrationPasswordFormAlter in src/FormAlter.php
Applies the user_register_form_alter on form_mode_manager register routes.

File

src/FormAlter.php, line 125

Class

FormAlter
Manipulates Form Alter information.

Namespace

Drupal\form_mode_manager

Code

public function appliesUserRegistrationPasswordFormAlter($formId, $dynamicFormId) {
  $routeObject = $this->routeMatch
    ->getRouteObject();
  $formModeMachineName = $this->formModeManager
    ->getFormModeMachineName($routeObject
    ->getDefault('_entity_form'));
  return $this->formModeManager
    ->isActive('user', NULL, $formModeMachineName) && $dynamicFormId === $formId;
}