public function Webform::updateWebformHandler in Webform 8.5
Same name and namespace in other branches
- 6.x src/Entity/Webform.php \Drupal\webform\Entity\Webform::updateWebformHandler()
Update a webform handler for this webform.
Parameters
\Drupal\webform\Plugin\WebformHandlerInterface $handler: The webform handler object.
Return value
$this
Overrides WebformInterface::updateWebformHandler
File
- src/
Entity/ Webform.php, line 2658
Class
- Webform
- Defines the webform entity.
Namespace
Drupal\webform\EntityCode
public function updateWebformHandler(WebformHandlerInterface $handler) {
$handler
->setWebform($this);
$handler_id = $handler
->getHandlerId();
$configuration = $handler
->getConfiguration();
$this
->getHandlers()
->setInstanceConfiguration($handler_id, $configuration);
$this
->save();
$this
->resetHandlers();
$handler
->updateHandler();
return $this;
}