class CurrencyConstraint in Price 2.0.x
Same name and namespace in other branches
- 8 src/Plugin/Validation/Constraint/CurrencyConstraint.php \Drupal\price\Plugin\Validation\Constraint\CurrencyConstraint
- 3.x src/Plugin/Validation/Constraint/CurrencyConstraint.php \Drupal\price\Plugin\Validation\Constraint\CurrencyConstraint
- 2.x src/Plugin/Validation/Constraint/CurrencyConstraint.php \Drupal\price\Plugin\Validation\Constraint\CurrencyConstraint
- 3.0.x src/Plugin/Validation/Constraint/CurrencyConstraint.php \Drupal\price\Plugin\Validation\Constraint\CurrencyConstraint
Currency constraint.
Plugin annotation
@Constraint(
id = "PriceCurrency",
label = @Translation("Currency", context = "Validation"),
type = { "price_price" }
)
Hierarchy
- class \Drupal\price\Plugin\Validation\Constraint\CurrencyConstraint extends \Symfony\Component\Validator\Constraint
Expanded class hierarchy of CurrencyConstraint
File
- src/
Plugin/ Validation/ Constraint/ CurrencyConstraint.php, line 16
Namespace
Drupal\price\Plugin\Validation\ConstraintView source
class CurrencyConstraint extends Constraint {
/**
* The array of available currencies.
*
* @var array
*/
public $availableCurrencies = [];
/**
* The default violation message.
*
* @var string
*/
public $invalidMessage = 'The currency %value is not valid.';
/**
* The "not available" message.
*
* @var string
*/
public $notAvailableMessage = 'The currency %value is not available.';
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CurrencyConstraint:: |
public | property | The array of available currencies. | |
CurrencyConstraint:: |
public | property | The default violation message. | |
CurrencyConstraint:: |
public | property | The "not available" message. |