interface WidgetSelectorInterface in Entity Browser 8
Same name and namespace in other branches
- 8.2 src/WidgetSelectorInterface.php \Drupal\entity_browser\WidgetSelectorInterface
Defines the interface for entity browser widget selectors.
This plugin type is responsible for providing ways for users to select the current widget used for selecting entities in an entity browser. For example, if the user wants to tab between widgets, the tab set will be created and managed by the widget selector.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Component\Plugin\ConfigurableInterface; interface \Drupal\Core\Plugin\PluginFormInterface; interface \Drupal\Component\Plugin\DependentPluginInterface
- interface \Drupal\entity_browser\WidgetSelectorInterface
Expanded class hierarchy of WidgetSelectorInterface
All classes that implement WidgetSelectorInterface
1 file declares its use of WidgetSelectorInterface
- EntityBrowserTest.php in tests/
src/ Kernel/ Extension/ EntityBrowserTest.php
File
- src/
WidgetSelectorInterface.php, line 19
Namespace
Drupal\entity_browserView source
interface WidgetSelectorInterface extends PluginInspectionInterface, ConfigurableInterface, PluginFormInterface, DependentPluginInterface {
/**
* Returns the widget selector label.
*
* @return string
* The widget label.
*/
public function label();
/**
* Returns widget selector form.
*
* @return array
* Form structure.
*/
public function getForm(array &$form, FormStateInterface &$form_state);
/**
* Sets the default widget.
*
* @param string $widget
* Id of widget to set as the current widget.
*/
public function setDefaultWidget($widget);
/**
* Validates form.
*
* @param array $form
* Form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* Form state object.
*/
public function validate(array &$form, FormStateInterface $form_state);
/**
* Submits form.
*
* @param array $form
* Form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* Form state object.
*
* @return string
* The selected widget ID.
*/
public function submit(array &$form, FormStateInterface $form_state);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigurableInterface:: |
public | function | Gets default configuration for this plugin. | 11 |
ConfigurableInterface:: |
public | function | Gets this plugin's configuration. | 12 |
ConfigurableInterface:: |
public | function | Sets the configuration for this plugin instance. | 12 |
DependentPluginInterface:: |
public | function | Calculates dependencies for the configured plugin. | 19 |
PluginFormInterface:: |
public | function | Form constructor. | 36 |
PluginFormInterface:: |
public | function | Form submission handler. | 32 |
PluginFormInterface:: |
public | function | Form validation handler. | 18 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |
WidgetSelectorInterface:: |
public | function | Returns widget selector form. | 3 |
WidgetSelectorInterface:: |
public | function | Returns the widget selector label. | 1 |
WidgetSelectorInterface:: |
public | function | Sets the default widget. | 1 |
WidgetSelectorInterface:: |
public | function | Submits form. | 1 |
WidgetSelectorInterface:: |
public | function | Validates form. | 1 |