You are here

interface WebformElementEntityReferenceInterface in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Plugin/WebformElementEntityReferenceInterface.php \Drupal\webform\Plugin\WebformElementEntityReferenceInterface

Provides an 'entity_reference' interface used to detect entity reference elements.

Hierarchy

Expanded class hierarchy of WebformElementEntityReferenceInterface

All classes that implement WebformElementEntityReferenceInterface

10 files declare their use of WebformElementEntityReferenceInterface
EntityAutocomplete.php in src/Plugin/WebformElement/EntityAutocomplete.php
OptionsBase.php in src/Plugin/WebformElement/OptionsBase.php
webform.tokens.inc in ./webform.tokens.inc
Builds placeholder replacement tokens for webforms and submissions.
WebformCompositeBase.php in src/Plugin/WebformElement/WebformCompositeBase.php
WebformDevelSchema.php in modules/webform_devel/src/WebformDevelSchema.php

... See full list

File

src/Plugin/WebformElementEntityReferenceInterface.php, line 10

Namespace

Drupal\webform\Plugin
View source
interface WebformElementEntityReferenceInterface extends WebformElementInterface {

  /**
   * Get referenced entity type.
   *
   * @param array $element
   *   An element.
   *
   * @return string
   *   A entity type.
   */
  public function getTargetType(array $element);

  /**
   * Get referenced entity.
   *
   * @param array $element
   *   An element.
   * @param \Drupal\webform\WebformSubmissionInterface $webform_submission
   *   A webform submission.
   * @param array $options
   *   An array of options.
   *
   * @return \Drupal\Core\Entity\EntityInterface
   *   The referenced entity.
   */
  public function getTargetEntity(array $element, WebformSubmissionInterface $webform_submission, array $options = []);

  /**
   * Get referenced entities.
   *
   * @param array $element
   *   An element.
   * @param \Drupal\webform\WebformSubmissionInterface $webform_submission
   *   A webform submission.
   * @param array $options
   *   An array of options.
   *
   * @return array
   *   An associative array containing entities keyed by entity_id.
   */
  public function getTargetEntities(array $element, WebformSubmissionInterface $webform_submission, array $options = []);

}

Members

Namesort descending Modifiers Type Description Overrides
ContainerFactoryPluginInterface::create public static function Creates an instance of the plugin. 112
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
WebformElementEntityReferenceInterface::getTargetEntities public function Get referenced entities. 1
WebformElementEntityReferenceInterface::getTargetEntity public function Get referenced entity. 1
WebformElementEntityReferenceInterface::getTargetType public function Get referenced entity type. 1
WebformElementInterface::alterForm public function Alter an element's associated form. 1
WebformElementInterface::buildExportHeader public function Build an element's export header. 1
WebformElementInterface::buildExportOptionsForm public function Get an element's export options webform. 1
WebformElementInterface::buildExportRecord public function Build an element's export row. 1
WebformElementInterface::buildHtml public function Build an element as HTML element. 1
WebformElementInterface::buildText public function Build an element as text element. 1
WebformElementInterface::checkAccessRules public function Check element access (rules). 1
WebformElementInterface::displayDisabledWarning public function Display element disabled warning. 1
WebformElementInterface::finalize public function Finalize an element to be rendered within a webform. 1
WebformElementInterface::form public function Gets the actual configuration webform array to be built. 1
WebformElementInterface::formatHtml public function Format an element's value as HTML. 1
WebformElementInterface::formatTableColumn public function Format an element's table column value. 1
WebformElementInterface::formatText public function Format an element's value as plain text. 1
WebformElementInterface::getAdminLabel public function Get an element's admin label (#admin_title, #title or #webform_key). 1
WebformElementInterface::getConfigurationFormProperties public function Get an associative array of element properties from configuration webform. 1
WebformElementInterface::getDefaultKey public function Gets the element's default key. 1
WebformElementInterface::getDefaultProperties public function Get default properties. 1
WebformElementInterface::getDefaultProperty public function Get an element's default property value. 1
WebformElementInterface::getElementProperty public function Get an element's property value. 1
WebformElementInterface::getElementSelectorInputValue public function Get an element's (sub)input selector value. 1
WebformElementInterface::getElementSelectorOptions public function Get an element's selectors as options. 1
WebformElementInterface::getElementSelectorSourceValues public function Get an element's selectors source values. 1
WebformElementInterface::getElementStateOptions public function Get an element's supported states as options. 1
WebformElementInterface::getExportDefaultOptions public function Get an element's default export options. 1
WebformElementInterface::getFormElementClassDefinition public function Get the Webform element's form element class definition. 1
WebformElementInterface::getInfo public function Retrieves the default properties for the defined element type. 1
WebformElementInterface::getItemDefaultFormat public function Get an element's default single value format name. 1
WebformElementInterface::getItemFormat public function Get element's single value format name by looking for '#format' property, global settings, and finally default settings. 1
WebformElementInterface::getItemFormats public function Get an element's available single value formats. 1
WebformElementInterface::getItemsDefaultFormat public function Get an element's default multiple value format name. 1
WebformElementInterface::getItemsFormat public function Get element's multiple value format name by looking for '#format' property, global settings, and finally default settings. 1
WebformElementInterface::getItemsFormats public function Get an element's available multiple value formats. 1
WebformElementInterface::getKey public function Get an element's key/name. 1
WebformElementInterface::getLabel public function Get an element's label (#title or #webform_key). 1
WebformElementInterface::getOffCanvasWidth public function Get configuration form's off-canvas width. 1
WebformElementInterface::getPluginApiLink public function Get link to element's API documentation. 1
WebformElementInterface::getPluginApiUrl public function Get the URL for the element's API documentation. 1
WebformElementInterface::getPluginCategory public function Gets the category of the plugin instance. 1
WebformElementInterface::getPluginDescription public function Gets the description of the plugin instance. 1
WebformElementInterface::getPluginLabel public function Gets the label of the plugin instance. 1
WebformElementInterface::getRawValue public function Get an element's submission raw value. 1
WebformElementInterface::getRelatedTypes public function Get related element types. 1
WebformElementInterface::getTableColumn public function Get element's table column(s) settings. 1
WebformElementInterface::getTestValues public function Get test values for an element. 1
WebformElementInterface::getTranslatableProperties public function Get translatable properties. 1
WebformElementInterface::getTypeName public function Gets the type name (aka id) of the plugin instance with the 'webform_' prefix. 1
WebformElementInterface::getValue public function Get an element's submission value. 1
WebformElementInterface::hasManagedFiles public function Determine if the element is or includes a managed_file upload element. 1
WebformElementInterface::hasMultipleValues public function Checks if the element value has multiple values. 1
WebformElementInterface::hasMultipleWrapper public function Checks if the element uses the 'webform_multiple' element. 1
WebformElementInterface::hasProperty public function Determine if the element supports a specified property. 1
WebformElementInterface::hasValue public function Determine if an element's has a submission value. 1
WebformElementInterface::hasWrapper public function Checks if the element has a wrapper. 1
WebformElementInterface::initialize public function Initialize an element to be displayed, rendered, or exported. 1
WebformElementInterface::isComposite public function Checks if the element is a composite element. 1
WebformElementInterface::isContainer public function Checks if the element is a container that can contain elements. 1
WebformElementInterface::isDisabled public function Checks if the element is disabled. 1
WebformElementInterface::isEmptyExcluded public function Checks if an empty element is excluded. 1
WebformElementInterface::isEnabled public function Checks if the element is enabled. 1
WebformElementInterface::isExcluded public function Checks if the element is excluded via webform.settings. 1
WebformElementInterface::isHidden public function Checks if the element is hidden. 1
WebformElementInterface::isInput public function Checks if the element carries a value. 1
WebformElementInterface::isMultiline public function Checks if the element value could contain multiple lines. 1
WebformElementInterface::isRoot public function Checks if the element is a root element. 1
WebformElementInterface::postCreate public function Acts on a webform submission element after it is created. 1
WebformElementInterface::postDelete public function Delete any additional value associated with an element. 1
WebformElementInterface::postLoad public function Acts on loaded webform submission. 1
WebformElementInterface::postSave public function Acts on a saved webform submission element before the insert or update hook is invoked. 1
WebformElementInterface::preCreate public function Changes the values of an entity before it is created. 1
WebformElementInterface::prepare public function Prepare an element to be rendered within a webform. 1
WebformElementInterface::preSave public function Acts on a webform submission element before the presave hook is invoked. 1
WebformElementInterface::preview public function Generate a renderable preview of the element. 1
WebformElementInterface::replaceTokens public function Replace tokens for all element properties. 1
WebformElementInterface::setDefaultValue public function Set an element's default value using saved data. 1
WebformElementInterface::supportsMultipleValues public function Checks if the element supports multiple values. 1
WebformEntityInjectionInterface::getWebform public function Get the webform that this handler is attached to.
WebformEntityInjectionInterface::getWebformSubmission public function Get the webform submission that this handler is handling.
WebformEntityInjectionInterface::resetEntities public function Reset webform and webform submission entity.
WebformEntityInjectionInterface::setEntities public function Set webform and webform submission entity.
WebformEntityInjectionInterface::setWebform public function Set the webform that this is handler is attached to.
WebformEntityInjectionInterface::setWebformSubmission public function Set the webform submission that this handler is handling.