You are here

public static function BrightcoveVideoPlaylistForm::apiClientUpdateForm in Brightcove Video Connect 8

Same name and namespace in other branches
  1. 8.2 src/Form/BrightcoveVideoPlaylistForm.php \Drupal\brightcove\Form\BrightcoveVideoPlaylistForm::apiClientUpdateForm()
  2. 3.x src/Form/BrightcoveVideoPlaylistForm.php \Drupal\brightcove\Form\BrightcoveVideoPlaylistForm::apiClientUpdateForm()

Ajax callback to update the player options list.

Parameters

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

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

Return value

\Drupal\Core\Ajax\AjaxResponse Ajax command response.

2 calls to BrightcoveVideoPlaylistForm::apiClientUpdateForm()
BrightcovePlaylistForm::apiClientUpdateForm in src/Form/BrightcovePlaylistForm.php
Ajax callback to update the player options list.
BrightcoveVideoForm::apiClientUpdateForm in src/Form/BrightcoveVideoForm.php
Ajax callback to update the player options list.
2 methods override BrightcoveVideoPlaylistForm::apiClientUpdateForm()
BrightcovePlaylistForm::apiClientUpdateForm in src/Form/BrightcovePlaylistForm.php
Ajax callback to update the player options list.
BrightcoveVideoForm::apiClientUpdateForm in src/Form/BrightcoveVideoForm.php
Ajax callback to update the player options list.

File

src/Form/BrightcoveVideoPlaylistForm.php, line 127

Class

BrightcoveVideoPlaylistForm
Base form controller for Video and Playlist forms.

Namespace

Drupal\brightcove\Form

Code

public static function apiClientUpdateForm(array $form, FormStateInterface $form_state) {
  $form['player']['widget']['#options'] = self::getPlayerOptions($form, $form_state);
  $response = new AjaxResponse();
  $response
    ->addCommand(new ReplaceCommand('#' . $form['api_client']['widget']['#ajax']['wrapper'], $form['player']));
  return $response;
}