You are here

public function OEmbed::getSourceFieldConstraints in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/media/src/Plugin/media/Source/OEmbed.php \Drupal\media\Plugin\media\Source\OEmbed::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.

Overrides MediaSourceFieldConstraintsInterface::getSourceFieldConstraints

File

core/modules/media/src/Plugin/media/Source/OEmbed.php, line 484

Class

OEmbed
Provides a media source plugin for oEmbed resources.

Namespace

Drupal\media\Plugin\media\Source

Code

public function getSourceFieldConstraints() {
  return [
    'oembed_resource' => [],
  ];
}