You are here

public property RulesCommerceProductEvent::$commerce_product in Scheduler 2.x

The commerce product which is being processed.

This property name could be changed to lowerCamelCase but that would also require the context_definitions key to be changed to match. This could also be done, but when editing a rule we get commerceproduct in the drop-downs, whereas all other usages in the Rules forms have commerce_product. This is confusing for the admin/developer who has to select from this list when editing a rule. There keep the property name matching the entity type id prevent Coder from reporting the invalid name by disabling this specific sniff for this file only.

phpcs:disable Drupal.NamingConventions.ValidVariableName.LowerCamelName

Type: Drupal\commerce_product\Entity\ProductInterface

File

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

Class

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

Namespace

Drupal\scheduler_rules_integration\Event

Code

public $commerce_product;