You are here

interface WebformEntityInjectionInterface in Webform 8.5

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

Defines the interface for webform entity injection interface.

Hierarchy

Expanded class hierarchy of WebformEntityInjectionInterface

All classes that implement WebformEntityInjectionInterface

File

src/Plugin/WebformEntityInjectionInterface.php, line 12

Namespace

Drupal\webform\Plugin
View source
interface WebformEntityInjectionInterface {

  /**
   * Set the webform that this is handler is attached to.
   *
   * @param \Drupal\webform\WebformInterface $webform
   *   A webform.
   *
   * @return $this
   *   This webform handler.
   */
  public function setWebform(WebformInterface $webform = NULL);

  /**
   * Get the webform that this handler is attached to.
   *
   * @return \Drupal\webform\WebformInterface
   *   A webform.
   */
  public function getWebform();

  /**
   * Set the webform submission that this handler is handling.
   *
   * @param \Drupal\webform\WebformSubmissionInterface $webform_submission
   *   A webform submission.
   *
   * @return $this
   *   This webform handler.
   */
  public function setWebformSubmission(WebformSubmissionInterface $webform_submission = NULL);

  /**
   * Get the webform submission that this handler is handling.
   *
   * @return \Drupal\webform\WebformSubmissionInterface
   *   A webform submission.
   */
  public function getWebformSubmission();

  /**
   * Set webform and webform submission entity.
   *
   * @param \Drupal\webform\WebformInterface|\Drupal\webform\WebformSubmissionInterface $entity
   *   A webform or webform submission entity.
   *
   * @return $this
   *   This webform handler.
   *
   * @throws \Exception
   *   Throw exception if entity type is not a webform or webform submission.
   */
  public function setEntities(EntityInterface $entity);

  /**
   * Reset webform and webform submission entity.
   */
  public function resetEntities();

}

Members

Namesort descending Modifiers Type Description Overrides
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.