You are here

public function AvailabilityCheckerInterface::check in Commerce Core 8.2

Same name in this branch
  1. 8.2 src/AvailabilityCheckerInterface.php \Drupal\commerce\AvailabilityCheckerInterface::check()
  2. 8.2 modules/order/src/AvailabilityCheckerInterface.php \Drupal\commerce_order\AvailabilityCheckerInterface::check()

Checks the availability of the given purchasable entity.

Parameters

\Drupal\commerce\PurchasableEntityInterface $entity: The purchasable entity.

string $quantity: The quantity.

\Drupal\commerce\Context $context: The context.

Return value

bool|null TRUE if the entity is available, FALSE if it's unavailable, or NULL if it has no opinion.

File

src/AvailabilityCheckerInterface.php, line 39

Class

AvailabilityCheckerInterface
Defines the interface for availability checkers.

Namespace

Drupal\commerce

Code

public function check(PurchasableEntityInterface $entity, $quantity, Context $context);