You are here

interface WidgetValidationInterface in Entity Browser 8

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

Defines the interface for entity browser widget validations.

Hierarchy

Expanded class hierarchy of WidgetValidationInterface

All classes that implement WidgetValidationInterface

File

src/WidgetValidationInterface.php, line 12

Namespace

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

  /**
   * Returns the widget validation label.
   *
   * @return string
   *   The widget validation label.
   */
  public function label();

  /**
   * Validates the widget.
   *
   * @param array $entities
   *   Array of selected entities.
   * @param array $options
   *   (Optional) Array of options needed by the constraint validator.
   *
   * @return \Symfony\Component\Validator\ConstraintViolationListInterface
   *   A list of constraint violations. If the list is empty, validation
   *   succeeded.
   */
  public function validate(array $entities, array $options = []);

}

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
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
WidgetValidationInterface::label public function Returns the widget validation label. 1
WidgetValidationInterface::validate public function Validates the widget. 1