You are here

interface WebformEntityReferenceManagerInterface in Webform 8.5

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

Defines an interface for webform entity manager classes.

Hierarchy

Expanded class hierarchy of WebformEntityReferenceManagerInterface

All classes that implement WebformEntityReferenceManagerInterface

7 files declare their use of WebformEntityReferenceManagerInterface
QueryStringWebformSourceEntity.php in src/Plugin/WebformSourceEntity/QueryStringWebformSourceEntity.php
QueryStringWebformSourceEntityTest.php in tests/src/Unit/Plugin/WebformSourceEntity/QueryStringWebformSourceEntityTest.php
Webform.php in src/Plugin/Condition/Webform.php
WebformAccessGroupForm.php in modules/webform_access/src/WebformAccessGroupForm.php
WebformNodeEntityReferenceController.php in modules/webform_node/src/Controller/WebformNodeEntityReferenceController.php

... See full list

File

src/WebformEntityReferenceManagerInterface.php, line 10

Namespace

Drupal\webform
View source
interface WebformEntityReferenceManagerInterface {

  /****************************************************************************/

  // User data methods.

  /****************************************************************************/

  /**
   * Is the current request a webform route where the user can specify a webform.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   A fieldable content entity.
   *
   * @return bool
   *   TRUE if the current request a webform route where the user can
   *   specify a webform.
   */
  public function isUserWebformRoute(EntityInterface $entity);

  /**
   * Set user specified webform for a source entity.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   A fieldable content entity.
   * @param string $webform_id
   *   A webform id.
   */
  public function setUserWebformId(EntityInterface $entity, $webform_id);

  /**
   * Get user specified webform for a source entity.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   A fieldable content entity.
   *
   * @return string|null
   *   A webform id or NULL.
   */
  public function getUserWebformId(EntityInterface $entity);

  /**
   * Delete user specified webform for a source entity.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   A fieldable content entity.
   */
  public function deleteUserWebformId(EntityInterface $entity);

  /****************************************************************************/

  // Field methods.

  /****************************************************************************/

  /**
   * Determine if the entity has a webform entity reference field.
   *
   * @param \Drupal\Core\Entity\EntityInterface|null $entity
   *   A fieldable content entity.
   *
   * @return bool
   *   TRUE if the entity has a webform entity reference field.
   */
  public function hasField(EntityInterface $entity = NULL);

  /**
   * Get an entity's webform field name.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   A fieldable content entity.
   *
   * @return string
   *   The name of the webform field or an empty string.
   */
  public function getFieldName(EntityInterface $entity = NULL);

  /**
   * Get an entity's webform field names.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   A fieldable content entity.
   *
   * @return array
   *   An array of webform fields associate with an entity.
   */
  public function getFieldNames(EntityInterface $entity = NULL);

  /**
   * Get an entity's target webform.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   A fieldable content entity.
   *
   * @return \Drupal\webform\WebformInterface|null
   *   The entity's target webform or NULL.
   */
  public function getWebform(EntityInterface $entity = NULL);

  /**
   * Get an entity's target webform.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   A fieldable content entity.
   *
   * @return array
   *   An array of webforms.
   */
  public function getWebforms(EntityInterface $entity = NULL);

  /****************************************************************************/

  // Table methods.

  /****************************************************************************/

  /**
   * Get the table names for all webform field instances.
   *
   * @return array
   *   An associative array of webform field table names and webform field names.
   */
  public function getTableNames();

}

Members

Namesort descending Modifiers Type Description Overrides
WebformEntityReferenceManagerInterface::deleteUserWebformId public function Delete user specified webform for a source entity. 1
WebformEntityReferenceManagerInterface::getFieldName public function Get an entity's webform field name. 1
WebformEntityReferenceManagerInterface::getFieldNames public function Get an entity's webform field names. 1
WebformEntityReferenceManagerInterface::getTableNames public function Get the table names for all webform field instances. 1
WebformEntityReferenceManagerInterface::getUserWebformId public function Get user specified webform for a source entity. 1
WebformEntityReferenceManagerInterface::getWebform public function Get an entity's target webform. 1
WebformEntityReferenceManagerInterface::getWebforms public function Get an entity's target webform. 1
WebformEntityReferenceManagerInterface::hasField public function Determine if the entity has a webform entity reference field. 1
WebformEntityReferenceManagerInterface::isUserWebformRoute public function Is the current request a webform route where the user can specify a webform. 1
WebformEntityReferenceManagerInterface::setUserWebformId public function Set user specified webform for a source entity. 1