You are here

interface SelectionDisplayInterface in Entity Browser 8

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

Defines the interface for entity browser selection displays.

This plugin type is responsible for displaying the currently selected entities in an entity browser and delivering them upstream. The selections are displayed in a form which delivers the selected entities on submit.

Hierarchy

Expanded class hierarchy of SelectionDisplayInterface

All classes that implement SelectionDisplayInterface

1 file declares its use of SelectionDisplayInterface
EntityBrowserTest.php in tests/src/Kernel/Extension/EntityBrowserTest.php

File

src/SelectionDisplayInterface.php, line 18

Namespace

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

  /**
   * Returns the selection display label.
   *
   * @return string
   *   The selection display label.
   */
  public function label();

  /**
   * Returns selection display form.
   *
   * @param array $original_form
   *   Entire form built up to this point. Form elements for selection display
   *   should generally not be added directly to it but returned from function
   *   as a separated unit.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   Form state object.
   *
   * @return array
   *   Form structure.
   */
  public function getForm(array &$original_form, FormStateInterface $form_state);

  /**
   * 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.
   */
  public function submit(array &$form, FormStateInterface $form_state);

  /**
   * Check does selection display support preselection.
   *
   * If preselection is not allowed by entity browser selection display, then
   * exception will be thrown.
   *
   * @deprecated Use ::supportsPreselection instead.
   *
   * @throws \Drupal\Core\Config\ConfigException
   */
  public function checkPreselectionSupport();

  /**
   * Check if the plugin supports preselection.
   *
   * @returns bool
   *   Returns TRUE if preselection is supported.
   */
  public function supportsPreselection();

  /**
   * Returns true if selection display supports selection over javascript.
   *
   * @return bool
   *   True if javascript add/remove events are supported.
   */
  public function supportsJsCommands();

}

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
PluginFormInterface::buildConfigurationForm public function Form constructor. 36
PluginFormInterface::submitConfigurationForm public function Form submission handler. 32
PluginFormInterface::validateConfigurationForm public function Form validation handler. 18
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
SelectionDisplayInterface::checkPreselectionSupport Deprecated public function Check does selection display support preselection. 1
SelectionDisplayInterface::getForm public function Returns selection display form. 3
SelectionDisplayInterface::label public function Returns the selection display label. 1
SelectionDisplayInterface::submit public function Submits form. 1
SelectionDisplayInterface::supportsJsCommands public function Returns true if selection display supports selection over javascript. 1
SelectionDisplayInterface::supportsPreselection public function Check if the plugin supports preselection. 1
SelectionDisplayInterface::validate public function Validates form. 1