PHP Класс spec\Sylius\Bundle\CoreBundle\Validator\Constraints\CartItemAvailabilityValidatorSpec

Автор: Arkadiusz Krakowiak ([email protected])
Наследование: extends PhpSpec\ObjectBehavior
Показать файл Открыть проект

Открытые методы

Метод Описание
it_adds_violation_if_requested_cart_item_is_not_available ( Symfony\Component\Validator\Context\ExecutionContextInterface $executionContext, Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface $availabilityChecker, Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface $addCartItemCommand, Sylius\Component\Core\Model\OrderInterface $order, Sylius\Component\Core\Model\OrderItemInterface $orderItem, Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
it_adds_violation_if_total_quantity_of_cart_items_exceed_available_quantity ( Symfony\Component\Validator\Context\ExecutionContextInterface $executionContext, Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface $availabilityChecker, Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface $addCartItemCommand, Sylius\Component\Core\Model\OrderInterface $order, Sylius\Component\Core\Model\OrderItemInterface $orderItem, Sylius\Component\Core\Model\OrderItemInterface $existingOrderItem, Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
it_does_not_add_violation_if_requested_cart_item_is_available ( Symfony\Component\Validator\Context\ExecutionContextInterface $executionContext, Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface $availabilityChecker, Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface $addCartItemCommand, Sylius\Component\Core\Model\OrderInterface $order, Sylius\Component\Core\Model\OrderItemInterface $orderItem, Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
it_does_not_add_violation_if_total_quantity_of_cart_items_do_not_exceed_available_quantity ( Symfony\Component\Validator\Context\ExecutionContextInterface $executionContext, Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface $availabilityChecker, Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface $addCartItemCommand, Sylius\Component\Core\Model\OrderInterface $order, Sylius\Component\Core\Model\OrderItemInterface $orderItem, Sylius\Component\Core\Model\OrderItemInterface $existingOrderItem, Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
it_is_cart_item_availability_validator ( Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface $addCartItemCommand )
it_is_constraint_validator ( )
it_is_initializable ( )
it_validates_only_add_cart_item_commands ( Sylius\Component\Core\Model\OrderInterface $order )
let ( Symfony\Component\Validator\Context\ExecutionContextInterface $executionContext, Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface $availabilityChecker )

Описание методов

it_adds_violation_if_requested_cart_item_is_not_available() публичный Метод

public it_adds_violation_if_requested_cart_item_is_not_available ( Symfony\Component\Validator\Context\ExecutionContextInterface $executionContext, Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface $availabilityChecker, Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface $addCartItemCommand, Sylius\Component\Core\Model\OrderInterface $order, Sylius\Component\Core\Model\OrderItemInterface $orderItem, Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
$executionContext Symfony\Component\Validator\Context\ExecutionContextInterface
$availabilityChecker Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface
$addCartItemCommand Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface
$order Sylius\Component\Core\Model\OrderInterface
$orderItem Sylius\Component\Core\Model\OrderItemInterface
$productVariant Sylius\Component\Core\Model\ProductVariantInterface

it_adds_violation_if_total_quantity_of_cart_items_exceed_available_quantity() публичный Метод

public it_adds_violation_if_total_quantity_of_cart_items_exceed_available_quantity ( Symfony\Component\Validator\Context\ExecutionContextInterface $executionContext, Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface $availabilityChecker, Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface $addCartItemCommand, Sylius\Component\Core\Model\OrderInterface $order, Sylius\Component\Core\Model\OrderItemInterface $orderItem, Sylius\Component\Core\Model\OrderItemInterface $existingOrderItem, Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
$executionContext Symfony\Component\Validator\Context\ExecutionContextInterface
$availabilityChecker Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface
$addCartItemCommand Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface
$order Sylius\Component\Core\Model\OrderInterface
$orderItem Sylius\Component\Core\Model\OrderItemInterface
$existingOrderItem Sylius\Component\Core\Model\OrderItemInterface
$productVariant Sylius\Component\Core\Model\ProductVariantInterface

it_does_not_add_violation_if_requested_cart_item_is_available() публичный Метод

public it_does_not_add_violation_if_requested_cart_item_is_available ( Symfony\Component\Validator\Context\ExecutionContextInterface $executionContext, Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface $availabilityChecker, Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface $addCartItemCommand, Sylius\Component\Core\Model\OrderInterface $order, Sylius\Component\Core\Model\OrderItemInterface $orderItem, Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
$executionContext Symfony\Component\Validator\Context\ExecutionContextInterface
$availabilityChecker Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface
$addCartItemCommand Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface
$order Sylius\Component\Core\Model\OrderInterface
$orderItem Sylius\Component\Core\Model\OrderItemInterface
$productVariant Sylius\Component\Core\Model\ProductVariantInterface

it_does_not_add_violation_if_total_quantity_of_cart_items_do_not_exceed_available_quantity() публичный Метод

public it_does_not_add_violation_if_total_quantity_of_cart_items_do_not_exceed_available_quantity ( Symfony\Component\Validator\Context\ExecutionContextInterface $executionContext, Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface $availabilityChecker, Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface $addCartItemCommand, Sylius\Component\Core\Model\OrderInterface $order, Sylius\Component\Core\Model\OrderItemInterface $orderItem, Sylius\Component\Core\Model\OrderItemInterface $existingOrderItem, Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
$executionContext Symfony\Component\Validator\Context\ExecutionContextInterface
$availabilityChecker Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface
$addCartItemCommand Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface
$order Sylius\Component\Core\Model\OrderInterface
$orderItem Sylius\Component\Core\Model\OrderItemInterface
$existingOrderItem Sylius\Component\Core\Model\OrderItemInterface
$productVariant Sylius\Component\Core\Model\ProductVariantInterface

it_is_cart_item_availability_validator() публичный Метод

public it_is_cart_item_availability_validator ( Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface $addCartItemCommand )
$addCartItemCommand Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface

it_is_constraint_validator() публичный Метод

it_is_initializable() публичный Метод

public it_is_initializable ( )

it_validates_only_add_cart_item_commands() публичный Метод

public it_validates_only_add_cart_item_commands ( Sylius\Component\Core\Model\OrderInterface $order )
$order Sylius\Component\Core\Model\OrderInterface

let() публичный Метод

public let ( Symfony\Component\Validator\Context\ExecutionContextInterface $executionContext, Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface $availabilityChecker )
$executionContext Symfony\Component\Validator\Context\ExecutionContextInterface
$availabilityChecker Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface