
| Current Path : /var/www/html/store/web/modules/contrib/commerce/src/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/store/web/modules/contrib/commerce/src/AvailabilityCheckerInterface.php |
<?php
namespace Drupal\commerce;
/**
* Defines the interface for availability checkers.
*
* @deprecated in commerce:8.x-2.18 and is removed from commerce:3.x.
* Use \Drupal\commerce_order\AvailabilityCheckerInterface instead.
*/
interface AvailabilityCheckerInterface {
/**
* Determines whether the checker applies to the given purchasable entity.
*
* @param \Drupal\commerce\PurchasableEntityInterface $entity
* The purchasable entity.
*
* @return bool
* TRUE if the checker applies to the given purchasable entity, FALSE
* otherwise.
*/
public function applies(PurchasableEntityInterface $entity);
/**
* Checks the availability of the given purchasable entity.
*
* @param \Drupal\commerce\PurchasableEntityInterface $entity
* The purchasable entity.
* @param string $quantity
* The quantity.
* @param \Drupal\commerce\Context $context
* The context.
*
* @return bool|null
* TRUE if the entity is available, FALSE if it's unavailable,
* or NULL if it has no opinion.
*/
public function check(PurchasableEntityInterface $entity, $quantity, Context $context);
}