interface PropertyMetadataInterface

A container for validation metadata of a property.

What exactly you define as "property" is up to you. The validator expects implementations of {@link MetadataInterface} that contain constraints and optionally a list of named properties that also have constraints (and may have further sub properties). Such properties are mapped by implementations of this interface.

@author Bernhard Schussek <bschussek@gmail.com>

Hierarchy

Expanded class hierarchy of PropertyMetadataInterface

All classes that implement PropertyMetadataInterface

See also

MetadataInterface

2 files declare their use of PropertyMetadataInterface
MemberMetadata.php in drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Mapping/MemberMetadata.php
Metadata.php in drupal/core/lib/Drupal/Core/TypedData/Validation/Metadata.php
Contains \Drupal\Core\TypedData\Validation\Metadata.

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/PropertyMetadataInterface.php, line 27

Namespace

Symfony\Component\Validator
View source
interface PropertyMetadataInterface extends MetadataInterface {

  /**
   * Returns the name of the property.
   *
   * @return string The property name.
   */
  public function getPropertyName();

  /**
   * Extracts the value of the property from the given container.
   *
   * @param mixed $containingValue The container to extract the property value from.
   *
   * @return mixed The value of the property.
   */
  public function getPropertyValue($containingValue);

}

Members

Namesort descending Modifiers Type Description Overrides
MetadataInterface::accept public function Implementation of the Visitor design pattern. 3
MetadataInterface::findConstraints public function Returns all constraints for a given validation group. 1
PropertyMetadataInterface::getPropertyName public function Returns the name of the property. 2
PropertyMetadataInterface::getPropertyValue public function Extracts the value of the property from the given container. 4