You are here

public function RulesCommerceProductEvent::getEntity in Scheduler 2.x

Returns the entity which is being processed.

File

scheduler_rules_integration/src/Event/RulesCommerceProductEvent.php, line 59

Class

RulesCommerceProductEvent
Class for all Commerce Product events for use in Rules module.

Namespace

Drupal\scheduler_rules_integration\Event

Code

public function getEntity() {

  // The Rules module requires the entity to be stored in a specifically named
  // property which will obviously vary according to the entity type being
  // processed. This generic getEntity() method is not strictly required by
  // Rules but is added for convenience when manipulating the event entity.
  return $this->commerce_product;
}