PHP Class Sylius\Bundle\CurrencyBundle\Validator\Constraints\UniqueCurrencyPairValidator

Author: Jan Góralski ([email protected])
Inheritance: extends Symfony\Component\Validator\ConstraintValidator
ファイルを表示 Open project: sylius/sylius

Public Methods

Method Description
__construct ( Sylius\Component\Currency\Repository\ExchangeRateRepositoryInterface $exchangeRateRepository )
validate ( $value, Constraint $constraint )

Private Methods

Method Description
isCurrencyPairUnique ( Sylius\Component\Currency\Model\CurrencyInterface $baseCurrency, Sylius\Component\Currency\Model\CurrencyInterface $targetCurrency ) : boolean

Method Details

__construct() public method

public __construct ( Sylius\Component\Currency\Repository\ExchangeRateRepositoryInterface $exchangeRateRepository )
$exchangeRateRepository Sylius\Component\Currency\Repository\ExchangeRateRepositoryInterface

validate() public method

public validate ( $value, Constraint $constraint )
$constraint Symfony\Component\Validator\Constraint