ConstraintViolationBuilder

Defines a constraint violation builder for the Typed Data validator.

We do not use the builder provided by Symfony as it is marked internal.

@codingStandardsIgnoreStart

Hierarchy

File

core/lib/Drupal/Core/TypedData/Validation/ConstraintViolationBuilder.php, line 19

Namespace

Drupal\Core\TypedData\Validation

Members

Name Modifiers Type Description
ConstraintViolationBuilder::$cause protected property
ConstraintViolationBuilder::$code protected property
ConstraintViolationBuilder::$constraint protected property
ConstraintViolationBuilder::$invalidValue protected property The invalid value caused the violation.
ConstraintViolationBuilder::$message protected property The violation message.
ConstraintViolationBuilder::$parameters protected property The message parameters.
ConstraintViolationBuilder::$plural protected property The number used
ConstraintViolationBuilder::$propertyPath protected property The property path.
ConstraintViolationBuilder::$root protected property The root path.
ConstraintViolationBuilder::$translationDomain protected property The translation domain.
ConstraintViolationBuilder::$translator protected property The translator.
ConstraintViolationBuilder::$violations protected property The list of violations.
ConstraintViolationBuilder::addViolation public function Adds the violation to the current execution context. Overrides ConstraintViolationBuilderInterface::addViolation
ConstraintViolationBuilder::atPath public function Stores the property path at which the violation should be generated. Overrides ConstraintViolationBuilderInterface::atPath
ConstraintViolationBuilder::setCause public function Sets the cause of the violation. Overrides ConstraintViolationBuilderInterface::setCause
ConstraintViolationBuilder::setCode public function Sets the violation code. Overrides ConstraintViolationBuilderInterface::setCode
ConstraintViolationBuilder::setInvalidValue public function Sets the invalid value that caused this violation. Overrides ConstraintViolationBuilderInterface::setInvalidValue
ConstraintViolationBuilder::setParameter public function Sets a parameter to be inserted into the violation message. Overrides ConstraintViolationBuilderInterface::setParameter
ConstraintViolationBuilder::setParameters public function Sets all parameters to be inserted into the violation message. Overrides ConstraintViolationBuilderInterface::setParameters
ConstraintViolationBuilder::setPlural public function Sets the number which determines how the plural form of the violation message is chosen when it is translated. Overrides ConstraintViolationBuilderInterface::setPlural
ConstraintViolationBuilder::setTranslationDomain public function Sets the translation domain which should be used for translating the violation message. Overrides ConstraintViolationBuilderInterface::setTranslationDomain
ConstraintViolationBuilder::__construct public function Constructs a new ConstraintViolationBuilder instance.
doc_Drupal
2016-10-29 08:56:10
Comments
Leave a Comment

Please login to continue.