You are here

interface FieldWidgetDisplayInterface in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 src/FieldWidgetDisplayInterface.php \Drupal\entity_browser\FieldWidgetDisplayInterface

Defines the interface for entity browser field widget display plugins.

Hierarchy

Expanded class hierarchy of FieldWidgetDisplayInterface

All classes that implement FieldWidgetDisplayInterface

File

src/FieldWidgetDisplayInterface.php, line 15

Namespace

Drupal\entity_browser
View source
interface FieldWidgetDisplayInterface extends PluginInspectionInterface, ConfigurableInterface, DependentPluginInterface {

  /**
   * Builds and gets render array for the entity.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   Entity to be displayed.
   *
   * @return array
   *   Render array that is to be used to display the entity in field widget.
   */
  public function view(EntityInterface $entity);

  /**
   * Returns a form to configure settings for the plugin.
   *
   * @param array $form
   *   The form where the settings form is being included in.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The current state of the form.
   *
   * @return array
   *   The form definition for the widget settings.
   */
  public function settingsForm(array $form, FormStateInterface $form_state);

  /**
   * Returns if the FieldWidgetDisplay can be used for the provided field.
   *
   * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
   *   The entity type that should be checked.
   *
   * @return bool
   *   TRUE if the FieldWidgetDisplay can be used, FALSE otherwise.
   */
  public function isApplicable(EntityTypeInterface $entity_type);

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 11
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 12
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 12
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 19
FieldWidgetDisplayInterface::isApplicable public function Returns if the FieldWidgetDisplay can be used for the provided field. 1
FieldWidgetDisplayInterface::settingsForm public function Returns a form to configure settings for the plugin. 1
FieldWidgetDisplayInterface::view public function Builds and gets render array for the entity. 3
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2