function MediaSourceFieldConstraintsInterface::getSourceFieldConstraints

Same name in other branches
  1. 8.9.x core/modules/media/src/MediaSourceFieldConstraintsInterface.php \Drupal\media\MediaSourceFieldConstraintsInterface::getSourceFieldConstraints()
  2. 10 core/modules/media/src/MediaSourceFieldConstraintsInterface.php \Drupal\media\MediaSourceFieldConstraintsInterface::getSourceFieldConstraints()
  3. 11.x core/modules/media/src/MediaSourceFieldConstraintsInterface.php \Drupal\media\MediaSourceFieldConstraintsInterface::getSourceFieldConstraints()

Gets media source-specific validation constraints for a source field.

Return value

\Symfony\Component\Validator\Constraint[] An array of validation constraint definitions, keyed by constraint name. Each constraint definition can be used for instantiating \Symfony\Component\Validator\Constraint objects.

2 methods override MediaSourceFieldConstraintsInterface::getSourceFieldConstraints()
OEmbed::getSourceFieldConstraints in core/modules/media/src/Plugin/media/Source/OEmbed.php
Gets media source-specific validation constraints for a source field.
TestWithConstraints::getSourceFieldConstraints in core/modules/media/tests/modules/media_test_source/src/Plugin/media/Source/TestWithConstraints.php
Gets media source-specific validation constraints for a source field.

File

core/modules/media/src/MediaSourceFieldConstraintsInterface.php, line 27

Class

MediaSourceFieldConstraintsInterface
Defines an interface for a media source with source field constraints.

Namespace

Drupal\media

Code

public function getSourceFieldConstraints();

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.