protected function PurchasedEntityConditionBase::isValid in Commerce Core 8.2
Determines whether the given purchasable entity is "valid".
Parameters
\Drupal\commerce\PurchasableEntityInterface|null $purchasable_entity: The purchasable entity.
Return value
bool Whether the given purchasable entity is "valid".
2 calls to PurchasedEntityConditionBase::isValid()
- OrderItemPurchasedEntity::evaluate in modules/
order/ src/ Plugin/ Commerce/ Condition/ OrderItemPurchasedEntity.php - Evaluates the condition.
- OrderPurchasedEntity::evaluate in modules/
order/ src/ Plugin/ Commerce/ Condition/ OrderPurchasedEntity.php - Evaluates the condition.
File
- modules/
order/ src/ Plugin/ Commerce/ Condition/ PurchasedEntityConditionBase.php, line 132
Class
Namespace
Drupal\commerce_order\Plugin\Commerce\ConditionCode
protected function isValid(PurchasableEntityInterface $purchasable_entity = NULL) : bool {
return $purchasable_entity !== NULL && $purchasable_entity
->getEntityTypeId() === $this
->getPurchasableEntityType() && in_array($purchasable_entity
->uuid(), $this->configuration['entities'], TRUE);
}