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 formAlter method.

Return value

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

1 call to FormAlter::candidateToAlterForm()
FormAlter::formAlter in modules/form_mode_user_roles_assign/src/FormAlter.php
Automatically assign user roles of register/create routes using FMM.

File

modules/form_mode_user_roles_assign/src/FormAlter.php, line 131

Class

FormAlter
Manipulates Form Alter information.

Namespace

Drupal\form_mode_user_roles_assign

Code

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