class FilterConditionsEvent in Commerce Core 8.2
Defines the event for filtering the available conditions.
Hierarchy
- class \Drupal\commerce\EventBase extends \Drupal\Component\EventDispatcher\Event
- class \Drupal\commerce\Event\FilterConditionsEvent
Expanded class hierarchy of FilterConditionsEvent
See also
\Drupal\commerce_payment\Event\PaymentEvents
3 files declare their use of FilterConditionsEvent
- ConditionManager.php in src/
ConditionManager.php - FilterConditionsEventSubscriber.php in modules/
payment/ src/ EventSubscriber/ FilterConditionsEventSubscriber.php - FilterConditionsEventSubscriber.php in modules/
promotion/ src/ EventSubscriber/ FilterConditionsEventSubscriber.php
File
- src/
Event/ FilterConditionsEvent.php, line 12
Namespace
Drupal\commerce\EventView source
class FilterConditionsEvent extends EventBase {
/**
* The condition definitions.
*
* @var array
*/
protected $definitions;
/**
* The parent entity type ID.
*
* @var string
*/
protected $parentEntityTypeId;
/**
* Constructs a new FilterConditionsEvent object.
*
* @param array $definitions
* The condition definitions.
* @param string $parent_entity_type_id
* The parent entity type ID.
*/
public function __construct(array $definitions, $parent_entity_type_id) {
$this->definitions = $definitions;
$this->parentEntityTypeId = $parent_entity_type_id;
}
/**
* Gets the condition definitions.
*
* @return array
* The condition definitions.
*/
public function getDefinitions() {
return $this->definitions;
}
/**
* Sets the condition definitions.
*
* @param array $definitions
* The condition definitions.
*
* @return $this
*/
public function setDefinitions(array $definitions) {
$this->definitions = $definitions;
return $this;
}
/**
* Gets the parent entity type ID.
*
* @return string
* The parent entity type ID.
*/
public function getParentEntityTypeId() {
return $this->parentEntityTypeId;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FilterConditionsEvent:: |
protected | property | The condition definitions. | |
FilterConditionsEvent:: |
protected | property | The parent entity type ID. | |
FilterConditionsEvent:: |
public | function | Gets the condition definitions. | |
FilterConditionsEvent:: |
public | function | Gets the parent entity type ID. | |
FilterConditionsEvent:: |
public | function | Sets the condition definitions. | |
FilterConditionsEvent:: |
public | function | Constructs a new FilterConditionsEvent object. |