You are here

class GalleryMediaBundleConstraint in D7 Media 8

Check that there is no Gallery type item in slideshow items.

Plugin annotation


@Constraint(
  id = "GalleryMediaBundle",
  label = @Translation("Gallery media bundle", context = "Validation"),
)

Hierarchy

Expanded class hierarchy of GalleryMediaBundleConstraint

File

src/Plugin/Validation/Constraint/GalleryMediaBundleConstraint.php, line 15

Namespace

Drupal\media\Plugin\Validation\Constraint
View source
class GalleryMediaBundleConstraint extends Constraint {

  /**
   * Name of the source field for slideshow bundle.
   *
   * @var string
   */
  public $sourceFieldName;

  /**
   * The default violation message.
   *
   * @var string
   */
  public $message = 'Gallery cannot contain gallery type item.';

}

Members

Namesort descending Modifiers Type Description Overrides
GalleryMediaBundleConstraint::$message public property The default violation message.
GalleryMediaBundleConstraint::$sourceFieldName public property Name of the source field for slideshow bundle.