You are here

public function OembedProviderForm::addCallback in oEmbed Providers 1.1.x

Same name and namespace in other branches
  1. 2.x src/OembedProviderForm.php \Drupal\oembed_providers\OembedProviderForm::addCallback()
  2. 1.0.x src/OembedProviderForm.php \Drupal\oembed_providers\OembedProviderForm::addCallback()

AJAX helper function for adding endpoints.

Parameters

array $form: A nested array form elements comprising the form.

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

File

src/OembedProviderForm.php, line 289

Class

OembedProviderForm
Form controller for the oEmbed provider edit/add forms.

Namespace

Drupal\oembed_providers

Code

public function addCallback(array &$form, FormStateInterface $form_state) {
  $form_state
    ->set('endpoint_add', TRUE);
  $form_state
    ->setRebuild();
}