class MediaMappingsConstraint

Same name in other branches
  1. 11.x core/modules/media/src/Plugin/Validation/Constraint/MediaMappingsConstraint.php \Drupal\media\Plugin\Validation\Constraint\MediaMappingsConstraint

Validates media mappings.

@internal

Plugin annotation


@Constraint(
  id = "MediaMappingsConstraint",
  label = @Translation("Media Mapping Constraint", context = "Validation"),
  type = {"string"}
)

Hierarchy

  • class \Drupal\media\Plugin\Validation\Constraint\MediaMappingsConstraint extends \Symfony\Component\Validator\Constraint

Expanded class hierarchy of MediaMappingsConstraint

File

core/modules/media/src/Plugin/Validation/Constraint/MediaMappingsConstraint.php, line 18

Namespace

Drupal\media\Plugin\Validation\Constraint
View source
class MediaMappingsConstraint extends Constraint {
    
    /**
     * The error message if source is used in media mapping.
     *
     * @var string
     */
    public string $invalidMappingMessage = 'It is not possible to map the source field @source_field_name of a media type.';

}

Members

Title Sort descending Modifiers Object type Summary
MediaMappingsConstraint::$invalidMappingMessage public property The error message if source is used in media mapping.

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