function FileUploadResult::addViolation
Same name in other branches
- 11.x core/modules/file/src/Upload/FileUploadResult.php \Drupal\file\Upload\FileUploadResult::addViolation()
Adds a constraint violation.
Parameters
\Symfony\Component\Validator\ConstraintViolationInterface $violation: The constraint violation.
File
-
core/
modules/ file/ src/ Upload/ FileUploadResult.php, line 157
Class
- FileUploadResult
- Value object for a file upload result.
Namespace
Drupal\file\UploadCode
public function addViolation(ConstraintViolationInterface $violation) : void {
$this->violations
->add($violation);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.