Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ConstraintViolationListInterface.php

interface ConstraintViolationListInterface

A list of constraint violations.

@author Bernhard Schussek <bschussek@gmail.com>

@extends \ArrayAccess<int, ConstraintViolationInterface> @extends \Traversable<int, ConstraintViolationInterface>

Hierarchy

  • interface \Symfony\Component\Validator\ConstraintViolationListInterface extends \Symfony\Component\Validator\Traversable \Symfony\Component\Validator\Countable \Symfony\Component\Validator\ArrayAccess

Expanded class hierarchy of ConstraintViolationListInterface

All classes that implement ConstraintViolationListInterface

29 files declare their use of ConstraintViolationListInterface
CKEditor5.php in core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php
CompoundConstraintTestCase.php in vendor/symfony/validator/Test/CompoundConstraintTestCase.php
ConstraintValidatorTestCase.php in vendor/symfony/validator/Test/ConstraintValidatorTestCase.php
ConstraintViolationListNormalizer.php in vendor/symfony/serializer/Normalizer/ConstraintViolationListNormalizer.php
ContextualValidatorInterface.php in vendor/symfony/validator/Validator/ContextualValidatorInterface.php

... See full list

File

vendor/symfony/validator/ConstraintViolationListInterface.php, line 24

Namespace

Symfony\Component\Validator
View source
interface ConstraintViolationListInterface extends \Traversable, \Countable, \ArrayAccess {
    
    /**
     * Adds a constraint violation to this list.
     */
    public function add(ConstraintViolationInterface $violation) : void;
    
    /**
     * Merges an existing violation list into this list.
     */
    public function addAll(self $otherList) : void;
    
    /**
     * Returns the violation at a given offset.
     *
     * @param int $offset The offset of the violation
     *
     * @throws OutOfBoundsException if the offset does not exist
     */
    public function get(int $offset) : ConstraintViolationInterface;
    
    /**
     * Returns whether the given offset exists.
     *
     * @param int $offset The violation offset
     */
    public function has(int $offset) : bool;
    
    /**
     * Sets a violation at a given offset.
     *
     * @param int $offset The violation offset
     */
    public function set(int $offset, ConstraintViolationInterface $violation) : void;
    
    /**
     * Removes a violation at a given offset.
     *
     * @param int $offset The offset to remove
     */
    public function remove(int $offset) : void;
    
    /**
     * Converts the violation into a string for debugging purposes.
     */
    public function __toString() : string;

}

Members

Title Sort descending Modifiers Object type Summary Overrides
ConstraintViolationListInterface::add public function Adds a constraint violation to this list. 1
ConstraintViolationListInterface::addAll public function Merges an existing violation list into this list. 1
ConstraintViolationListInterface::get public function Returns the violation at a given offset. 1
ConstraintViolationListInterface::has public function Returns whether the given offset exists. 1
ConstraintViolationListInterface::remove public function Removes a violation at a given offset. 1
ConstraintViolationListInterface::set public function Sets a violation at a given offset. 1
ConstraintViolationListInterface::__toString public function Converts the violation into a string for debugging purposes. 1

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal