class LicenseSubscriptionTypeConstraint in Commerce License 8.2
Ensures the license subscription type can only be used with a license trait.
Plugin annotation
@Constraint(
id = "LicenseSubscriptionType",
label = @Translation("The license subscription type.", context = "Validation")
)
Hierarchy
- class \Drupal\commerce_license\Plugin\Validation\Constraint\LicenseSubscriptionTypeConstraint extends \Symfony\Component\Validator\Constraint
Expanded class hierarchy of LicenseSubscriptionTypeConstraint
File
- src/
Plugin/ Validation/ Constraint/ LicenseSubscriptionTypeConstraint.php, line 15
Namespace
Drupal\commerce_license\Plugin\Validation\ConstraintView source
class LicenseSubscriptionTypeConstraint extends Constraint {
/**
* The default violation message.
*
* @var string
*/
public $message = 'The License subscription type may only be used on product variations which are configured to use a license.' . ' ' . 'You must enable the license trait on the <a href="@url-edit-product-variation-type">edit %product-variation-type-label product variation type</a>.';
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LicenseSubscriptionTypeConstraint:: |
public | property | The default violation message. |