Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / media / src / MediaSourceFieldConstraintsInterface.php
1 <?php
2
3 namespace Drupal\media;
4
5 /**
6  * Defines an interface for a media source with source field constraints.
7  *
8  * This allows a media source to optionally add source field validation
9  * constraints for media items. To add constraints at the entity level, a
10  * media source can also implement MediaSourceEntityConstraintsInterface.
11  *
12  * @see \Drupal\media\MediaSourceInterface
13  * @see \Drupal\media\MediaSourceEntityConstraintsInterface
14  * @see \Drupal\media\MediaSourceBase
15  * @see \Drupal\media\Entity\Media
16  */
17 interface MediaSourceFieldConstraintsInterface extends MediaSourceInterface {
18
19   /**
20    * Gets media source-specific validation constraints for a source field.
21    *
22    * @return \Symfony\Component\Validator\Constraint[]
23    *   An array of validation constraint definitions, keyed by constraint name.
24    *   Each constraint definition can be used for instantiating
25    *   \Symfony\Component\Validator\Constraint objects.
26    */
27   public function getSourceFieldConstraints();
28
29 }