Drupal 8  8.0.2
ExecutionContext Class Reference
Inheritance diagram for ExecutionContext:

Public Member Functions

 __construct (ValidatorInterface $validator, $root, TranslatorInterface $translator, $translationDomain=NULL)
 
 setNode ($value, $object, MetadataInterface $metadata=NULL, $propertyPath)
 
 setGroup ($group)
 
 setConstraint (Constraint $constraint)
 
 addViolation ($message, array $parameters=array(), $invalidValue=NULL, $plural=NULL, $code=NULL)
 
 buildViolation ($message, array $parameters=array())
 
 getViolations ()
 
 getValidator ()
 
 getRoot ()
 
 getValue ()
 
 getObject ()
 
 getMetadata ()
 
 getGroup ()
 
 getClassName ()
 
 getPropertyName ()
 
 getPropertyPath ($sub_path= '')
 
 addViolationAt ($subPath, $message, array $parameters=array(), $invalidValue=NULL, $plural=NULL, $code=NULL)
 
 validate ($value, $subPath= '', $groups=NULL, $traverse=FALSE, $deep=FALSE)
 
 markConstraintAsValidated ($cache_key, $constraint_hash)
 
 isConstraintValidated ($cache_key, $constraint_hash)
 
 validateValue ($value, $constraints, $subPath= '', $groups=NULL)
 
 markGroupAsValidated ($cache_key, $group_hash)
 
 isGroupValidated ($cache_key, $group_hash)
 
 markObjectAsInitialized ($cache_key)
 
 isObjectInitialized ($cache_key)
 
 getMetadataFactory ()
 

Protected Attributes

 $validator
 
 $root
 
 $translator
 
 $translationDomain
 
 $violations
 
 $value
 
 $data
 
 $propertyPath = ''
 
 $metadata
 
 $group
 
 $constraint
 
 $validatedObjects = array()
 
 $validatedConstraints = array()
 

Detailed Description

Defines an execution context class.

We do not use the context provided by Symfony as it is marked internal, so this class is pretty much the same, but has some code style changes as well as exceptions for methods we don't support.

Constructor & Destructor Documentation

__construct ( ValidatorInterface  $validator,
  $root,
TranslatorInterface  $translator,
  $translationDomain = NULL 
)

Creates a new ExecutionContext.

Parameters
\Symfony\Component\Validator\Validator\ValidatorInterface$validatorThe validator.
mixed$rootThe root.
\Drupal\Core\Validation\TranslatorInterface$translatorThe translator.
string$translationDomain(optional) The translation domain.

References Drupal\root().

Here is the call graph for this function:

Member Function Documentation

addViolation (   $message,
array  $parameters = array(),
  $invalidValue = NULL,
  $plural = NULL,
  $code = NULL 
)

{}

addViolationAt (   $subPath,
  $message,
array  $parameters = array(),
  $invalidValue = NULL,
  $plural = NULL,
  $code = NULL 
)

{}

buildViolation (   $message,
array  $parameters = array() 
)

{}

References Drupal\root().

Here is the call graph for this function:

getClassName ( )

{}

getGroup ( )

{}

getMetadata ( )

{}

getMetadataFactory ( )

{}

getObject ( )

{}

getPropertyName ( )

{}

getPropertyPath (   $sub_path = '')

{}

getRoot ( )

{}

getValidator ( )

{}

getValue ( )

{}

getViolations ( )

{}

isConstraintValidated (   $cache_key,
  $constraint_hash 
)

{}

isGroupValidated (   $cache_key,
  $group_hash 
)

{}

isObjectInitialized (   $cache_key)

{}

markConstraintAsValidated (   $cache_key,
  $constraint_hash 
)

{}

markGroupAsValidated (   $cache_key,
  $group_hash 
)

{}

markObjectAsInitialized (   $cache_key)

{}

setConstraint ( Constraint  $constraint)

{}

setGroup (   $group)

{}

setNode (   $value,
  $object,
MetadataInterface  $metadata = NULL,
  $propertyPath 
)

{}

validate (   $value,
  $subPath = '',
  $groups = NULL,
  $traverse = FALSE,
  $deep = FALSE 
)

{}

validateValue (   $value,
  $constraints,
  $subPath = '',
  $groups = NULL 
)

{}


The documentation for this class was generated from the following file: