You are here

public function TweetbuttonItem::getConstraints in Tweet Button 8

Gets a list of validation constraints.

Return value

array Array of constraints, each being an instance of \Symfony\Component\Validator\Constraint.

Overrides TypedData::getConstraints

File

lib/Drupal/tweetbutton/Plugin/Field/FieldType/TweetbuttonItem.php, line 84
Contains \Drupal\tweetbutton\Plugin\Field\FieldType\TweetbuttonItem.

Class

TweetbuttonItem
Plugin implementation of the 'tweetbutton' field type.

Namespace

Drupal\tweetbutton\Plugin\Field\FieldType

Code

public function getConstraints() {
  $constraint_manager = \Drupal::typedDataManager()
    ->getValidationConstraintManager();
  $constraints = parent::getConstraints();
  return $constraints;
}