class TweetEmbedCodeConstraint in Media entity Twitter 8
Checks if a value is a valid Tweet embed code/URL.
Plugin annotation
@Constraint(
id = "TweetEmbedCode",
label = @Translation("Tweet embed code", context = "Validation"),
type = { "link", "string", "string_long" }
)
Hierarchy
- class \Drupal\media_entity_twitter\Plugin\Validation\Constraint\TweetEmbedCodeConstraint extends \Symfony\Component\Validator\Constraint
Expanded class hierarchy of TweetEmbedCodeConstraint
1 file declares its use of TweetEmbedCodeConstraint
- ConstraintsTest.php in tests/
src/ Unit/ ConstraintsTest.php
File
- src/
Plugin/ Validation/ Constraint/ TweetEmbedCodeConstraint.php, line 16
Namespace
Drupal\media_entity_twitter\Plugin\Validation\ConstraintView source
class TweetEmbedCodeConstraint extends Constraint {
/**
* The default violation message.
*
* @var string
*/
public $message = 'Not valid Tweet URL/embed code.';
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TweetEmbedCodeConstraint:: |
public | property | The default violation message. |