public function TextFormat::postDelete in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Plugin/WebformElement/TextFormat.php \Drupal\webform\Plugin\WebformElement\TextFormat::postDelete()
Delete any additional value associated with an element.
Currently only applicable to file uploads.
Parameters
array $element: An element.
\Drupal\webform\WebformSubmissionInterface $webform_submission: A webform submission.
Overrides WebformElementBase::postDelete
File
- src/
Plugin/ WebformElement/ TextFormat.php, line 376
Class
- TextFormat
- Provides a 'text_format' element.
Namespace
Drupal\webform\Plugin\WebformElementCode
public function postDelete(array &$element, WebformSubmissionInterface $webform_submission) {
$key = $element['#webform_key'];
$value = $webform_submission
->getElementData($key);
$uuids = _webform_parse_file_uuids($value['value']);
_webform_delete_file_usage($uuids, $webform_submission
->getEntityTypeId(), $webform_submission
->id(), 0);
}