public function BrightcoveVideo::getSourceFieldConstraints in Brightcove Video Connect 8.2
Same name and namespace in other branches
- 3.x modules/media_brightcove/src/Plugin/media/Source/BrightcoveVideo.php \Drupal\media_brightcove\Plugin\media\Source\BrightcoveVideo::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
- modules/
media_brightcove/ src/ Plugin/ media/ Source/ BrightcoveVideo.php, line 130
Class
- BrightcoveVideo
- Brightcove Video entity media source.
Namespace
Drupal\media_brightcove\Plugin\media\SourceCode
public function getSourceFieldConstraints() {
// Make sure that the referenced entity is a brightcove_video one, although
// this validation happens only when creating a media item with this
// MediaSource plugin.
// Theoretically this will not be needed when the automatically-created
// source field gets really locked.
// @see https://www.drupal.org/node/2274433#comment-12007765
return [
'BrightcoveVideoConstraint' => [],
];
}