interface ConditionInterface in Commerce Core 8.2
Defines the interface for conditions.
Hierarchy
- interface \Drupal\Component\Plugin\ConfigurableInterface; interface \Drupal\Component\Plugin\DependentPluginInterface; interface \Drupal\Core\Plugin\PluginFormInterface; interface \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\commerce\Plugin\Commerce\Condition\ConditionInterface
Expanded class hierarchy of ConditionInterface
All classes that implement ConditionInterface
3 files declare their use of ConditionInterface
- OrderItemPromotionOfferBase.php in modules/
promotion/ src/ Plugin/ Commerce/ PromotionOffer/ OrderItemPromotionOfferBase.php - OrderItemQuantityTest.php in modules/
promotion/ tests/ src/ Unit/ Plugin/ Commerce/ Condition/ OrderItemQuantityTest.php - Promotion.php in modules/
promotion/ src/ Entity/ Promotion.php
File
- src/
Plugin/ Commerce/ Condition/ ConditionInterface.php, line 14
Namespace
Drupal\commerce\Plugin\Commerce\ConditionView source
interface ConditionInterface extends ConfigurableInterface, DependentPluginInterface, PluginFormInterface, PluginInspectionInterface {
/**
* Gets the condition label.
*
* @return string
* The condition label.
*/
public function getLabel();
/**
* Gets the condition display label.
*
* Shown in the condition UI when enabling/disabling a condition.
*
* @return string
* The condition display label.
*/
public function getDisplayLabel();
/**
* Gets the condition entity type ID.
*
* This is the entity type ID of the entity passed to evaluate().
*
* @return string
* The condition's entity type ID.
*/
public function getEntityTypeId();
/**
* Evaluates the condition.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity.
*
* @return bool
* TRUE if the condition has been met, FALSE otherwise.
*/
public function evaluate(EntityInterface $entity);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConditionInterface:: |
public | function | Evaluates the condition. | 20 |
ConditionInterface:: |
public | function | Gets the condition display label. | 1 |
ConditionInterface:: |
public | function | Gets the condition entity type ID. | 1 |
ConditionInterface:: |
public | function | Gets the condition label. | 1 |
ConfigurableInterface:: |
public | function | Gets default configuration for this plugin. | 11 |
ConfigurableInterface:: |
public | function | Gets this plugin's configuration. | 12 |
ConfigurableInterface:: |
public | function | Sets the configuration for this plugin instance. | 12 |
DependentPluginInterface:: |
public | function | Calculates dependencies for the configured plugin. | 19 |
PluginFormInterface:: |
public | function | Form constructor. | 36 |
PluginFormInterface:: |
public | function | Form submission handler. | 32 |
PluginFormInterface:: |
public | function | Form validation handler. | 18 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |