You are here

public function ManageResolverRelationships::submitForm in Chaos Tool Suite (ctools) 8.3

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides FormInterface::submitForm

File

src/Form/ManageResolverRelationships.php, line 119

Class

ManageResolverRelationships
Provider manage resolver relationships.

Namespace

Drupal\ctools\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  if ($form_state
    ->getTriggeringElement()['#name'] == 'add') {
    $cached_values = $form_state
      ->getTemporaryValue('wizard');
    list(, $route_parameters) = $this
      ->getRelationshipOperationsRouteInfo($cached_values, $this->machine_name, $form_state
      ->getValue('relationships'));
    $form_state
      ->setRedirect($this
      ->getAddRoute($cached_values), $route_parameters);
  }
}