public function EmbedCode::getForm in Varbase Media 8.7
Same name and namespace in other branches
- 8.5 modules/entity_browser_generic_embed/src/Plugin/EntityBrowser/Widget/EmbedCode.php \Drupal\entity_browser_generic_embed\Plugin\EntityBrowser\Widget\EmbedCode::getForm()
- 8.6 modules/entity_browser_generic_embed/src/Plugin/EntityBrowser/Widget/EmbedCode.php \Drupal\entity_browser_generic_embed\Plugin\EntityBrowser\Widget\EmbedCode::getForm()
- 9.0.x modules/entity_browser_generic_embed/src/Plugin/EntityBrowser/Widget/EmbedCode.php \Drupal\entity_browser_generic_embed\Plugin\EntityBrowser\Widget\EmbedCode::getForm()
Overrides EntityFormProxy::getForm
File
- modules/
entity_browser_generic_embed/ src/ Plugin/ EntityBrowser/ Widget/ EmbedCode.php, line 22
Class
- EmbedCode
- An Entity Browser widget for creating media entities from embed codes.
Namespace
Drupal\entity_browser_generic_embed\Plugin\EntityBrowser\WidgetCode
public function getForm(array &$original_form, FormStateInterface $form_state, array $additional_widget_parameters) {
$form = parent::getForm($original_form, $form_state, $additional_widget_parameters);
$form['input'] = [
'#type' => 'textarea',
'#placeholder' => $this
->t('Enter a URL...'),
'#attributes' => [
'class' => [
'keyup-change',
],
],
'#ajax' => [
'event' => 'change',
'wrapper' => 'entity',
'method' => 'html',
'callback' => [
static::class,
'ajax',
],
],
"#description" => $this
->getEmbedDescription($form_state),
];
return $form;
}