1 | <?php |
||
19 | class TicketPricesConnection extends ConnectionBase |
||
20 | { |
||
21 | |||
22 | |||
23 | /** |
||
24 | * TicketConnection constructor. |
||
25 | * |
||
26 | * @param EEM_Price $model |
||
27 | */ |
||
28 | public function __construct(EEM_Price $model) |
||
32 | |||
33 | |||
34 | /** |
||
35 | * @return array |
||
36 | * @since $VID:$ |
||
37 | */ |
||
38 | public function config() |
||
39 | { |
||
40 | return [ |
||
41 | 'fromType' => $this->namespace . 'Ticket', |
||
42 | 'toType' => $this->namespace . 'Price', |
||
43 | 'fromFieldName' => 'prices', |
||
44 | 'connectionTypeName' => "{$this->namespace}TicketPricesConnection", |
||
45 | 'connectionArgs' => self::get_connection_args(), |
||
46 | 'resolve' => [$this, 'resolveConnection'], |
||
47 | ]; |
||
48 | } |
||
49 | |||
50 | |||
51 | /** |
||
52 | * @param $entity |
||
53 | * @param $args |
||
54 | * @param $context |
||
55 | * @param $info |
||
56 | * @return array |
||
57 | * @throws Exception |
||
58 | * @since $VID:$ |
||
59 | */ |
||
60 | public function resolveConnection($entity, $args, $context, $info) |
||
65 | |||
66 | /** |
||
67 | * Given an optional array of args, this returns the args to be used in the connection |
||
68 | * |
||
69 | * @access public |
||
70 | * @param array $args The args to modify the defaults |
||
71 | * |
||
72 | * @return array |
||
73 | */ |
||
74 | // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps |
||
75 | public static function get_connection_args($args = []) |
||
131 | } |
||
132 |