MediaMappingsConstraint.php

Same filename in other branches
  1. 10 core/modules/media/src/Plugin/Validation/Constraint/MediaMappingsConstraint.php

Namespace

Drupal\media\Plugin\Validation\Constraint

File

core/modules/media/src/Plugin/Validation/Constraint/MediaMappingsConstraint.php

View source
<?php

namespace Drupal\media\Plugin\Validation\Constraint;

use Symfony\Component\Validator\Constraint;

/**
 * Validates media mappings.
 *
 * @internal
 *
 * @Constraint(
 *   id = "MediaMappingsConstraint",
 *   label = @Translation("Media Mapping Constraint", context = "Validation"),
 *   type = {"string"}
 * )
 */
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.';

}

Classes

Title Deprecated Summary
MediaMappingsConstraint Validates media mappings.

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