You are here

public function MediaSourceEntityConstraintsInterface::getEntityConstraints in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/media/src/MediaSourceEntityConstraintsInterface.php \Drupal\media\MediaSourceEntityConstraintsInterface::getEntityConstraints()
  2. 9 core/modules/media/src/MediaSourceEntityConstraintsInterface.php \Drupal\media\MediaSourceEntityConstraintsInterface::getEntityConstraints()

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

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.

1 method overrides MediaSourceEntityConstraintsInterface::getEntityConstraints()
TestWithConstraints::getEntityConstraints in core/modules/media/tests/modules/media_test_source/src/Plugin/media/Source/TestWithConstraints.php
Gets media source-specific validation constraints for a media item.

File

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

Class

MediaSourceEntityConstraintsInterface
Defines an interface for a media source with entity constraints.

Namespace

Drupal\media

Code

public function getEntityConstraints();