-
Notifications
You must be signed in to change notification settings - Fork 252
Expand file tree
/
Copy pathPromotionStorageInterface.php
More file actions
43 lines (36 loc) · 1.22 KB
/
PromotionStorageInterface.php
File metadata and controls
43 lines (36 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
namespace Drupal\commerce_promotion;
use Drupal\commerce_order\Entity\OrderTypeInterface;
use Drupal\commerce_store\Entity\StoreInterface;
use Drupal\Core\Entity\ContentEntityStorageInterface;
/**
* Defines the interface for promotion storage.
*/
interface PromotionStorageInterface extends ContentEntityStorageInterface {
/**
* Loads the available promotions for the given order type and store.
*
* @param \Drupal\commerce_order\Entity\OrderTypeInterface $order_type
* The order type.
* @param \Drupal\commerce_store\Entity\StoreInterface $store
* The store.
*
* @return \Drupal\commerce_promotion\Entity\PromotionInterface[]
* The available promotions.
*/
public function loadAvailable(OrderTypeInterface $order_type, StoreInterface $store);
/**
* Return active promotions that have passed their end date.
*
* @return \Drupal\commerce_promotion\Entity\PromotionInterface[]
* The expired promotion entities.
*/
public function loadExpired();
/**
* Returns active promotions which have a met their maximum usage.
*
* @return \Drupal\commerce_promotion\Entity\PromotionInterface[]
* Promotions with maxed usage.
*/
public function loadMaxedUsage();
}