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

Breadcrumb

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

function Constraint::getTargets

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

Return value

self::CLASS_CONSTRAINT|self::PROPERTY_CONSTRAINT|array<self::CLASS_CONSTRAINT|self::PROPERTY_CONSTRAINT>

8 methods override Constraint::getTargets()
Callback::getTargets in vendor/symfony/validator/Constraints/Callback.php
Returns whether the constraint can be put onto classes, properties or both.
Cascade::getTargets in vendor/symfony/validator/Constraints/Cascade.php
Returns whether the constraint can be put onto classes, properties or both.
DisableAutoMapping::getTargets in vendor/symfony/validator/Constraints/DisableAutoMapping.php
Returns whether the constraint can be put onto classes, properties or both.
EnableAutoMapping::getTargets in vendor/symfony/validator/Constraints/EnableAutoMapping.php
Returns whether the constraint can be put onto classes, properties or both.
Expression::getTargets in vendor/symfony/validator/Constraints/Expression.php
Returns whether the constraint can be put onto classes, properties or both.

... See full list

File

vendor/symfony/validator/Constraint.php, line 283

Class

Constraint
Contains the properties of a constraint definition.

Namespace

Symfony\Component\Validator

Code

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

API Navigation

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