You are here

public function WebformEntityInjectionTrait::setWebform in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Plugin/WebformEntityInjectionTrait.php \Drupal\webform\Plugin\WebformEntityInjectionTrait::setWebform()

Set the webform that this is handler is attached to.

Parameters

\Drupal\webform\WebformInterface $webform: A webform.

Return value

$this This webform handler.

File

src/Plugin/WebformEntityInjectionTrait.php, line 37

Class

WebformEntityInjectionTrait
Provides an webform/webform submission entity inject trait.

Namespace

Drupal\webform\Plugin

Code

public function setWebform(WebformInterface $webform = NULL) {
  $this->webform = $webform;
  return $this;
}