public function WebformRevisions::deleteElement in Config Entity Revisions 8
Same name and namespace in other branches
- 1.x modules/webform_revisions/src/Entity/WebformRevisions.php \Drupal\webform_revisions\Entity\WebformRevisions::deleteElement()
Remove an element.
Parameters
string $key: The element's key.
Overrides Webform::deleteElement
File
- modules/
webform_revisions/ src/ Entity/ WebformRevisions.php, line 69
Class
Namespace
Drupal\webform_revisions\EntityCode
public function deleteElement($key) {
// Delete element from the elements render array.
$elements = $this
->getElementsDecoded();
$sub_element_keys = $this
->deleteElementRecursive($elements, $key);
$this
->setElements($elements);
// Don't delete submission data so that it can still be viewed for previous
// revisions.
}