class RecurringOrderProcessor in Commerce Recurring Framework 8
Refreshes draft recurring orders.
Hierarchy
- class \Drupal\commerce_recurring\RecurringOrderProcessor implements OrderProcessorInterface
Expanded class hierarchy of RecurringOrderProcessor
1 string reference to 'RecurringOrderProcessor'
1 service uses RecurringOrderProcessor
File
- src/
RecurringOrderProcessor.php, line 11
Namespace
Drupal\commerce_recurringView source
class RecurringOrderProcessor implements OrderProcessorInterface {
/**
* The recurring order manager.
*
* @var \Drupal\commerce_recurring\RecurringOrderManagerInterface
*/
protected $recurringOrderManager;
/**
* Constructs a new RecurringOrderProcessor object.
*
* @param \Drupal\commerce_recurring\RecurringOrderManagerInterface $recurring_order_manager
* The recurring order manager.
*/
public function __construct(RecurringOrderManagerInterface $recurring_order_manager) {
$this->recurringOrderManager = $recurring_order_manager;
}
/**
* {@inheritdoc}
*/
public function process(OrderInterface $order) {
if ($order
->bundle() == 'recurring') {
$this->recurringOrderManager
->refreshOrder($order);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RecurringOrderProcessor:: |
protected | property | The recurring order manager. | |
RecurringOrderProcessor:: |
public | function |
Processes an order. Overrides OrderProcessorInterface:: |
|
RecurringOrderProcessor:: |
public | function | Constructs a new RecurringOrderProcessor object. |