public function DummyWidget::getForm in Entity Browser 8
Same name and namespace in other branches
- 8.2 tests/modules/entity_browser_test/src/Plugin/EntityBrowser/Widget/DummyWidget.php \Drupal\entity_browser_test\Plugin\EntityBrowser\Widget\DummyWidget::getForm()
Returns widget form.
Parameters
array $original_form: Entire form bult up to this point. Form elements for widget should generally not be added directly to it but returned from funciton as a separated unit.
\Drupal\Core\Form\FormStateInterface $form_state: Form state object.
array $additional_widget_parameters: Additional parameters that we want to pass to the widget.
Return value
array Form structure.
Overrides WidgetBase::getForm
File
- tests/
modules/ entity_browser_test/ src/ Plugin/ EntityBrowser/ Widget/ DummyWidget.php, line 38
Class
- DummyWidget
- Dummy widget implementation for test purposes.
Namespace
Drupal\entity_browser_test\Plugin\EntityBrowser\WidgetCode
public function getForm(array &$original_form, FormStateInterface $form_state, array $additional_widget_parameters) {
return [
'#markup' => $this->configuration['text'],
'#parents' => [],
];
}