public function EmbedButtonForm::updateTypeSettings in Embed 8
Ajax callback to update the form fields which depend on embed type.
Parameters
array $form: The build form.
\Drupal\Core\Form\FormStateInterface $form_state: The form state.
Return value
\Drupal\Core\Ajax\AjaxResponse Ajax response with updated options for the embed type.
File
- src/
Form/ EmbedButtonForm.php, line 245
Class
- EmbedButtonForm
- Form controller for embed button forms.
Namespace
Drupal\embed\FormCode
public function updateTypeSettings(array &$form, FormStateInterface $form_state) {
$response = new AjaxResponse();
// Update options for entity type bundles.
$response
->addCommand(new ReplaceCommand('#embed-type-settings-wrapper', $form['type_settings']));
return $response;
}