public function Keycloak::addRuleSubmit in Keycloak OpenID Connect 8
Submit function for the 'Add rule' ajax callback.
Adds an empty rule row to the user group mapping rules table.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
File
- src/
Plugin/ OpenIDConnectClient/ Keycloak.php, line 461  
Class
- Keycloak
 - OpenID Connect client for Keycloak.
 
Namespace
Drupal\keycloak\Plugin\OpenIDConnectClientCode
public function addRuleSubmit(array &$form, FormStateInterface $form_state) {
  $uuid = $this->uuid
    ->generate();
  $rules = $form_state
    ->get('rules');
  array_push($rules, $uuid);
  $form_state
    ->set('rules', $rules);
  $form_state
    ->setRebuild();
}