public static function EntityFormProxy::ajax in Varbase Media 8.7
Same name and namespace in other branches
- 8.5 modules/entity_browser_generic_embed/src/Plugin/EntityBrowser/Widget/EntityFormProxy.php \Drupal\entity_browser_generic_embed\Plugin\EntityBrowser\Widget\EntityFormProxy::ajax()
- 8.6 modules/entity_browser_generic_embed/src/Plugin/EntityBrowser/Widget/EntityFormProxy.php \Drupal\entity_browser_generic_embed\Plugin\EntityBrowser\Widget\EntityFormProxy::ajax()
- 9.0.x modules/entity_browser_generic_embed/src/Plugin/EntityBrowser/Widget/EntityFormProxy.php \Drupal\entity_browser_generic_embed\Plugin\EntityBrowser\Widget\EntityFormProxy::ajax()
AJAX callback. Returns the rebuilt inline entity form.
Parameters
array $form: The complete form.
\Drupal\Core\Form\FormStateInterface $form_state: The current form state.
Return value
\Drupal\Core\Ajax\AjaxResponse The AJAX response.
File
- modules/
entity_browser_generic_embed/ src/ Plugin/ EntityBrowser/ Widget/ EntityFormProxy.php, line 178
Class
- EntityFormProxy
- Base class for EB widgets which wrap around an (inline) entity form.
Namespace
Drupal\entity_browser_generic_embed\Plugin\EntityBrowser\WidgetCode
public static function ajax(array &$form, FormStateInterface $form_state) {
return (new AjaxResponse())
->addCommand(new ReplaceCommand('#entity', $form['widget']['entity']));
}