
| Current Path : /var/www/html/rocksensor1/web/core/modules/file/src/Validation/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/rocksensor1/web/core/modules/file/src/Validation/FileValidatorInterface.php |
<?php
namespace Drupal\file\Validation;
use Drupal\file\FileInterface;
use Symfony\Component\Validator\ConstraintViolationListInterface;
/**
* Provides a file validator that supports a list of validations.
*/
interface FileValidatorInterface {
/**
* Validates a File with a list of validators.
*
* @param \Drupal\file\FileInterface $file
* The file to validate.
* @param array $validators
* An associative array of validators with:
* - key: the plugin ID of the file validation constraint.
* - value: an associative array of options to pass to the constraint.
*
* @return \Symfony\Component\Validator\ConstraintViolationListInterface
* The violations list.
*/
public function validate(FileInterface $file, array $validators): ConstraintViolationListInterface;
}