public function Constraint::getTargets

Returns whether the constraint can be put onto classes, properties or both

This method should return one or more of the constants Constraint::CLASS_CONSTRAINT and Constraint::PROPERTY_CONSTRAINT.

@api

Return value

string|array One or more constant values

7 methods override Constraint::getTargets()
Callback::getTargets in drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Constraints/Callback.php
Returns whether the constraint can be put onto classes, properties or both
ClassConstraint::getTargets in drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Fixtures/ClassConstraint.php
Returns whether the constraint can be put onto classes, properties or both
ConstraintA::getTargets in drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Fixtures/ConstraintA.php
Returns whether the constraint can be put onto classes, properties or both
ConstraintB::getTargets in drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Fixtures/ConstraintB.php
Returns whether the constraint can be put onto classes, properties or both
ConstraintC::getTargets in drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Fixtures/ConstraintC.php
Returns whether the constraint can be put onto classes, properties or both

... See full list

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Constraint.php, line 216

Class

Constraint
Contains the properties of a constraint definition.

Namespace

Symfony\Component\Validator

Code

public function getTargets() {
  return self::PROPERTY_CONSTRAINT;
}