You are here

public function FormAlter::candidateToAlterForm in Form mode manager 8.2

Same name in this branch
  1. 8.2 src/FormAlter.php \Drupal\form_mode_manager\FormAlter::candidateToAlterForm()
  2. 8.2 modules/form_mode_user_roles_assign/src/FormAlter.php \Drupal\form_mode_user_roles_assign\FormAlter::candidateToAlterForm()

Evaluate if FormModeManager do applies this formAlter for registration.

Return value

bool True if user_registration is enabled and this user route are FMM route.

1 call to FormAlter::candidateToAlterForm()
FormAlter::formAlter in src/FormAlter.php
Allow to use user_registrationpassword form_alter with FormModeManager.

File

src/FormAlter.php, line 138

Class

FormAlter
Manipulates Form Alter information.

Namespace

Drupal\form_mode_manager

Code

public function candidateToAlterForm() {
  $routeObject = $this->routeMatch
    ->getRouteObject();
  if (NULL === $routeObject) {
    return FALSE;
  }
  return $this->moduleHandler
    ->moduleExists('user_registrationpassword') && $routeObject
    ->getOption('_form_mode_manager_entity_type_id') === "user";
}