@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public function __construct() |
26 | 26 | { |
27 | - $this->setName($this->namespace . 'DatetimesConnectionOrderbyInput'); |
|
27 | + $this->setName($this->namespace.'DatetimesConnectionOrderbyInput'); |
|
28 | 28 | $this->setDescription(esc_html__('Options for ordering the connection', 'event_espresso')); |
29 | 29 | parent::__construct(); |
30 | 30 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | return [ |
40 | 40 | new GraphQLField( |
41 | 41 | 'field', |
42 | - ['non_null' => $this->namespace . 'DatetimesConnectionOrderbyEnum'] |
|
42 | + ['non_null' => $this->namespace.'DatetimesConnectionOrderbyEnum'] |
|
43 | 43 | ), |
44 | 44 | new GraphQLField( |
45 | 45 | 'order', |
@@ -16,31 +16,31 @@ |
||
16 | 16 | */ |
17 | 17 | class DatetimesConnectionOrderbyInput extends InputBase |
18 | 18 | { |
19 | - /** |
|
20 | - * DatetimesConnectionOrderbyInput constructor. |
|
21 | - */ |
|
22 | - public function __construct() |
|
23 | - { |
|
24 | - $this->setName($this->namespace . 'DatetimesConnectionOrderbyInput'); |
|
25 | - $this->setDescription(esc_html__('Options for ordering the connection', 'event_espresso')); |
|
26 | - parent::__construct(); |
|
27 | - } |
|
19 | + /** |
|
20 | + * DatetimesConnectionOrderbyInput constructor. |
|
21 | + */ |
|
22 | + public function __construct() |
|
23 | + { |
|
24 | + $this->setName($this->namespace . 'DatetimesConnectionOrderbyInput'); |
|
25 | + $this->setDescription(esc_html__('Options for ordering the connection', 'event_espresso')); |
|
26 | + parent::__construct(); |
|
27 | + } |
|
28 | 28 | |
29 | 29 | |
30 | - /** |
|
31 | - * @return GraphQLFieldInterface[] |
|
32 | - */ |
|
33 | - protected function getFields() |
|
34 | - { |
|
35 | - return [ |
|
36 | - new GraphQLField( |
|
37 | - 'field', |
|
38 | - ['non_null' => $this->namespace . 'DatetimesConnectionOrderbyEnum'] |
|
39 | - ), |
|
40 | - new GraphQLField( |
|
41 | - 'order', |
|
42 | - 'OrderEnum' |
|
43 | - ), |
|
44 | - ]; |
|
45 | - } |
|
30 | + /** |
|
31 | + * @return GraphQLFieldInterface[] |
|
32 | + */ |
|
33 | + protected function getFields() |
|
34 | + { |
|
35 | + return [ |
|
36 | + new GraphQLField( |
|
37 | + 'field', |
|
38 | + ['non_null' => $this->namespace . 'DatetimesConnectionOrderbyEnum'] |
|
39 | + ), |
|
40 | + new GraphQLField( |
|
41 | + 'order', |
|
42 | + 'OrderEnum' |
|
43 | + ), |
|
44 | + ]; |
|
45 | + } |
|
46 | 46 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public function __construct() |
26 | 26 | { |
27 | - $this->setName($this->namespace . 'TicketsConnectionOrderbyInput'); |
|
27 | + $this->setName($this->namespace.'TicketsConnectionOrderbyInput'); |
|
28 | 28 | $this->setDescription(esc_html__('Options for ordering the connection', 'event_espresso')); |
29 | 29 | parent::__construct(); |
30 | 30 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | return [ |
40 | 40 | new GraphQLField( |
41 | 41 | 'field', |
42 | - ['non_null' => $this->namespace . 'TicketsConnectionOrderbyEnum'] |
|
42 | + ['non_null' => $this->namespace.'TicketsConnectionOrderbyEnum'] |
|
43 | 43 | ), |
44 | 44 | new GraphQLField( |
45 | 45 | 'order', |
@@ -16,31 +16,31 @@ |
||
16 | 16 | */ |
17 | 17 | class TicketsConnectionOrderbyInput extends InputBase |
18 | 18 | { |
19 | - /** |
|
20 | - * TicketsConnectionOrderbyInput constructor. |
|
21 | - */ |
|
22 | - public function __construct() |
|
23 | - { |
|
24 | - $this->setName($this->namespace . 'TicketsConnectionOrderbyInput'); |
|
25 | - $this->setDescription(esc_html__('Options for ordering the connection', 'event_espresso')); |
|
26 | - parent::__construct(); |
|
27 | - } |
|
19 | + /** |
|
20 | + * TicketsConnectionOrderbyInput constructor. |
|
21 | + */ |
|
22 | + public function __construct() |
|
23 | + { |
|
24 | + $this->setName($this->namespace . 'TicketsConnectionOrderbyInput'); |
|
25 | + $this->setDescription(esc_html__('Options for ordering the connection', 'event_espresso')); |
|
26 | + parent::__construct(); |
|
27 | + } |
|
28 | 28 | |
29 | 29 | |
30 | - /** |
|
31 | - * @return GraphQLFieldInterface[] |
|
32 | - */ |
|
33 | - protected function getFields() |
|
34 | - { |
|
35 | - return [ |
|
36 | - new GraphQLField( |
|
37 | - 'field', |
|
38 | - ['non_null' => $this->namespace . 'TicketsConnectionOrderbyEnum'] |
|
39 | - ), |
|
40 | - new GraphQLField( |
|
41 | - 'order', |
|
42 | - 'OrderEnum' |
|
43 | - ), |
|
44 | - ]; |
|
45 | - } |
|
30 | + /** |
|
31 | + * @return GraphQLFieldInterface[] |
|
32 | + */ |
|
33 | + protected function getFields() |
|
34 | + { |
|
35 | + return [ |
|
36 | + new GraphQLField( |
|
37 | + 'field', |
|
38 | + ['non_null' => $this->namespace . 'TicketsConnectionOrderbyEnum'] |
|
39 | + ), |
|
40 | + new GraphQLField( |
|
41 | + 'order', |
|
42 | + 'OrderEnum' |
|
43 | + ), |
|
44 | + ]; |
|
45 | + } |
|
46 | 46 | } |
@@ -38,8 +38,8 @@ |
||
38 | 38 | { |
39 | 39 | return [ |
40 | 40 | 'fromType' => 'RootQuery', |
41 | - 'toType' => $this->namespace . 'Price', |
|
42 | - 'fromFieldName' => lcfirst($this->namespace) . 'Prices', |
|
41 | + 'toType' => $this->namespace.'Price', |
|
42 | + 'fromFieldName' => lcfirst($this->namespace).'Prices', |
|
43 | 43 | 'connectionTypeName' => "{$this->namespace}RootQueryPricesConnection", |
44 | 44 | 'connectionArgs' => TicketPricesConnection::get_connection_args(), |
45 | 45 | 'resolve' => [$this, 'resolveConnection'], |
@@ -18,43 +18,43 @@ |
||
18 | 18 | */ |
19 | 19 | class RootQueryPricesConnection extends AbstractRootQueryConnection |
20 | 20 | { |
21 | - /** |
|
22 | - * PriceConnection constructor. |
|
23 | - * |
|
24 | - * @param EEM_Price $model |
|
25 | - */ |
|
26 | - public function __construct(EEM_Price $model) |
|
27 | - { |
|
28 | - parent::__construct($model); |
|
29 | - } |
|
21 | + /** |
|
22 | + * PriceConnection constructor. |
|
23 | + * |
|
24 | + * @param EEM_Price $model |
|
25 | + */ |
|
26 | + public function __construct(EEM_Price $model) |
|
27 | + { |
|
28 | + parent::__construct($model); |
|
29 | + } |
|
30 | 30 | |
31 | 31 | |
32 | - /** |
|
33 | - * @return array |
|
34 | - */ |
|
35 | - public function config() |
|
36 | - { |
|
37 | - return [ |
|
38 | - 'fromType' => 'RootQuery', |
|
39 | - 'toType' => $this->namespace . 'Price', |
|
40 | - 'fromFieldName' => lcfirst($this->namespace) . 'Prices', |
|
41 | - 'connectionTypeName' => "{$this->namespace}RootQueryPricesConnection", |
|
42 | - 'connectionArgs' => TicketPricesConnection::get_connection_args(), |
|
43 | - 'resolve' => [$this, 'resolveConnection'], |
|
44 | - ]; |
|
45 | - } |
|
32 | + /** |
|
33 | + * @return array |
|
34 | + */ |
|
35 | + public function config() |
|
36 | + { |
|
37 | + return [ |
|
38 | + 'fromType' => 'RootQuery', |
|
39 | + 'toType' => $this->namespace . 'Price', |
|
40 | + 'fromFieldName' => lcfirst($this->namespace) . 'Prices', |
|
41 | + 'connectionTypeName' => "{$this->namespace}RootQueryPricesConnection", |
|
42 | + 'connectionArgs' => TicketPricesConnection::get_connection_args(), |
|
43 | + 'resolve' => [$this, 'resolveConnection'], |
|
44 | + ]; |
|
45 | + } |
|
46 | 46 | |
47 | 47 | |
48 | - /** |
|
49 | - * @param $entity |
|
50 | - * @param $args |
|
51 | - * @param $context |
|
52 | - * @param $info |
|
53 | - * @return PriceConnectionResolver |
|
54 | - * @throws Exception |
|
55 | - */ |
|
56 | - public function getConnectionResolver($entity, $args, $context, $info) |
|
57 | - { |
|
58 | - return new PriceConnectionResolver($entity, $args, $context, $info); |
|
59 | - } |
|
48 | + /** |
|
49 | + * @param $entity |
|
50 | + * @param $args |
|
51 | + * @param $context |
|
52 | + * @param $info |
|
53 | + * @return PriceConnectionResolver |
|
54 | + * @throws Exception |
|
55 | + */ |
|
56 | + public function getConnectionResolver($entity, $args, $context, $info) |
|
57 | + { |
|
58 | + return new PriceConnectionResolver($entity, $args, $context, $info); |
|
59 | + } |
|
60 | 60 | } |
@@ -38,8 +38,8 @@ |
||
38 | 38 | public function config() |
39 | 39 | { |
40 | 40 | return [ |
41 | - 'fromType' => $this->namespace . 'Datetime', |
|
42 | - 'toType' => $this->namespace . 'Ticket', |
|
41 | + 'fromType' => $this->namespace.'Datetime', |
|
42 | + 'toType' => $this->namespace.'Ticket', |
|
43 | 43 | 'fromFieldName' => 'tickets', |
44 | 44 | 'connectionTypeName' => "{$this->namespace}DatetimeTicketsConnection", |
45 | 45 | 'connectionArgs' => self::get_connection_args(), |
@@ -18,127 +18,127 @@ |
||
18 | 18 | */ |
19 | 19 | class DatetimeTicketsConnection extends ConnectionBase |
20 | 20 | { |
21 | - /** |
|
22 | - * DatetimeConnection constructor. |
|
23 | - * |
|
24 | - * @param EEM_Ticket $model |
|
25 | - */ |
|
26 | - public function __construct(EEM_Ticket $model) |
|
27 | - { |
|
28 | - parent::__construct($model); |
|
29 | - } |
|
21 | + /** |
|
22 | + * DatetimeConnection constructor. |
|
23 | + * |
|
24 | + * @param EEM_Ticket $model |
|
25 | + */ |
|
26 | + public function __construct(EEM_Ticket $model) |
|
27 | + { |
|
28 | + parent::__construct($model); |
|
29 | + } |
|
30 | 30 | |
31 | 31 | |
32 | - /** |
|
33 | - * @return array |
|
34 | - */ |
|
35 | - public function config() |
|
36 | - { |
|
37 | - return [ |
|
38 | - 'fromType' => $this->namespace . 'Datetime', |
|
39 | - 'toType' => $this->namespace . 'Ticket', |
|
40 | - 'fromFieldName' => 'tickets', |
|
41 | - 'connectionTypeName' => "{$this->namespace}DatetimeTicketsConnection", |
|
42 | - 'connectionArgs' => self::get_connection_args(), |
|
43 | - 'resolve' => [$this, 'resolveConnection'], |
|
44 | - ]; |
|
45 | - } |
|
32 | + /** |
|
33 | + * @return array |
|
34 | + */ |
|
35 | + public function config() |
|
36 | + { |
|
37 | + return [ |
|
38 | + 'fromType' => $this->namespace . 'Datetime', |
|
39 | + 'toType' => $this->namespace . 'Ticket', |
|
40 | + 'fromFieldName' => 'tickets', |
|
41 | + 'connectionTypeName' => "{$this->namespace}DatetimeTicketsConnection", |
|
42 | + 'connectionArgs' => self::get_connection_args(), |
|
43 | + 'resolve' => [$this, 'resolveConnection'], |
|
44 | + ]; |
|
45 | + } |
|
46 | 46 | |
47 | 47 | |
48 | - /** |
|
49 | - * @param $entity |
|
50 | - * @param $args |
|
51 | - * @param $context |
|
52 | - * @param $info |
|
53 | - * @return array|Deferred|mixed |
|
54 | - * @throws Exception |
|
55 | - */ |
|
56 | - public function resolveConnection($entity, $args, $context, $info) |
|
57 | - { |
|
58 | - $resolver = new TicketConnectionResolver($entity, $args, $context, $info); |
|
59 | - return $resolver->get_connection(); |
|
60 | - } |
|
48 | + /** |
|
49 | + * @param $entity |
|
50 | + * @param $args |
|
51 | + * @param $context |
|
52 | + * @param $info |
|
53 | + * @return array|Deferred|mixed |
|
54 | + * @throws Exception |
|
55 | + */ |
|
56 | + public function resolveConnection($entity, $args, $context, $info) |
|
57 | + { |
|
58 | + $resolver = new TicketConnectionResolver($entity, $args, $context, $info); |
|
59 | + return $resolver->get_connection(); |
|
60 | + } |
|
61 | 61 | |
62 | - /** |
|
63 | - * Given an optional array of args, this returns the args to be used in the connection |
|
64 | - * |
|
65 | - * @param array $args The args to modify the defaults |
|
66 | - * @return array |
|
67 | - */ |
|
68 | - // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps |
|
69 | - public static function get_connection_args($args = []) |
|
70 | - { |
|
71 | - $newArgs = [ |
|
72 | - 'orderby' => [ |
|
73 | - 'type' => ['list_of' => 'EspressoTicketsConnectionOrderbyInput'], |
|
74 | - 'description' => esc_html__('What parameter to use to order the objects by.', 'event_espresso'), |
|
75 | - ], |
|
76 | - 'datetime' => [ |
|
77 | - 'type' => 'ID', |
|
78 | - 'description' => esc_html__('Globally unique datetime ID to get the tickets for.', 'event_espresso'), |
|
79 | - ], |
|
80 | - 'datetimeIn' => [ |
|
81 | - 'type' => ['list_of' => 'ID'], |
|
82 | - 'description' => esc_html__('Globally unique datetime IDs to get the tickets for.', 'event_espresso'), |
|
83 | - ], |
|
84 | - 'datetimeId' => [ |
|
85 | - 'type' => 'Int', |
|
86 | - 'description' => esc_html__('Datetime ID to get the tickets for.', 'event_espresso'), |
|
87 | - ], |
|
88 | - 'datetimeIdIn' => [ |
|
89 | - 'type' => ['list_of' => 'Int'], |
|
90 | - 'description' => esc_html__('Datetime IDs to get the tickets for.', 'event_espresso'), |
|
91 | - ], |
|
92 | - 'event' => [ |
|
93 | - 'type' => 'ID', |
|
94 | - 'description' => esc_html__('Globally unique event ID to get the tickets for.', 'event_espresso'), |
|
95 | - ], |
|
96 | - 'eventIn' => [ |
|
97 | - 'type' => ['list_of' => 'ID'], |
|
98 | - 'description' => esc_html__('Globally unique event IDs to get the tickets for.', 'event_espresso'), |
|
99 | - ], |
|
100 | - 'eventId' => [ |
|
101 | - 'type' => 'Int', |
|
102 | - 'description' => esc_html__('Event ID to get the tickets for.', 'event_espresso'), |
|
103 | - ], |
|
104 | - 'eventIdIn' => [ |
|
105 | - 'type' => ['list_of' => 'Int'], |
|
106 | - 'description' => esc_html__('Event IDs to get the tickets for.', 'event_espresso'), |
|
107 | - ], |
|
108 | - 'includeDefaultTickets' => [ |
|
109 | - 'type' => 'Boolean', |
|
110 | - 'description' => esc_html__('Whether to add default tickets to the list.', 'event_espresso'), |
|
111 | - ], |
|
112 | - 'search' => [ |
|
113 | - 'type' => 'String', |
|
114 | - 'description' => esc_html__('The search keywords', 'event_espresso'), |
|
115 | - ], |
|
116 | - 'isDefault' => [ |
|
117 | - 'type' => 'Boolean', |
|
118 | - 'description' => esc_html__('Filter the default tickets', 'event_espresso'), |
|
119 | - ], |
|
120 | - 'isRequired' => [ |
|
121 | - 'type' => 'Boolean', |
|
122 | - 'description' => esc_html__('Filter the required tickets', 'event_espresso'), |
|
123 | - ], |
|
124 | - 'isTaxable' => [ |
|
125 | - 'type' => 'Boolean', |
|
126 | - 'description' => esc_html__('Filter the taxable tickets', 'event_espresso'), |
|
127 | - ], |
|
128 | - 'isTrashed' => [ |
|
129 | - 'type' => 'Boolean', |
|
130 | - 'description' => esc_html__('Filter the trashed tickets', 'event_espresso'), |
|
131 | - ], |
|
132 | - ]; |
|
62 | + /** |
|
63 | + * Given an optional array of args, this returns the args to be used in the connection |
|
64 | + * |
|
65 | + * @param array $args The args to modify the defaults |
|
66 | + * @return array |
|
67 | + */ |
|
68 | + // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps |
|
69 | + public static function get_connection_args($args = []) |
|
70 | + { |
|
71 | + $newArgs = [ |
|
72 | + 'orderby' => [ |
|
73 | + 'type' => ['list_of' => 'EspressoTicketsConnectionOrderbyInput'], |
|
74 | + 'description' => esc_html__('What parameter to use to order the objects by.', 'event_espresso'), |
|
75 | + ], |
|
76 | + 'datetime' => [ |
|
77 | + 'type' => 'ID', |
|
78 | + 'description' => esc_html__('Globally unique datetime ID to get the tickets for.', 'event_espresso'), |
|
79 | + ], |
|
80 | + 'datetimeIn' => [ |
|
81 | + 'type' => ['list_of' => 'ID'], |
|
82 | + 'description' => esc_html__('Globally unique datetime IDs to get the tickets for.', 'event_espresso'), |
|
83 | + ], |
|
84 | + 'datetimeId' => [ |
|
85 | + 'type' => 'Int', |
|
86 | + 'description' => esc_html__('Datetime ID to get the tickets for.', 'event_espresso'), |
|
87 | + ], |
|
88 | + 'datetimeIdIn' => [ |
|
89 | + 'type' => ['list_of' => 'Int'], |
|
90 | + 'description' => esc_html__('Datetime IDs to get the tickets for.', 'event_espresso'), |
|
91 | + ], |
|
92 | + 'event' => [ |
|
93 | + 'type' => 'ID', |
|
94 | + 'description' => esc_html__('Globally unique event ID to get the tickets for.', 'event_espresso'), |
|
95 | + ], |
|
96 | + 'eventIn' => [ |
|
97 | + 'type' => ['list_of' => 'ID'], |
|
98 | + 'description' => esc_html__('Globally unique event IDs to get the tickets for.', 'event_espresso'), |
|
99 | + ], |
|
100 | + 'eventId' => [ |
|
101 | + 'type' => 'Int', |
|
102 | + 'description' => esc_html__('Event ID to get the tickets for.', 'event_espresso'), |
|
103 | + ], |
|
104 | + 'eventIdIn' => [ |
|
105 | + 'type' => ['list_of' => 'Int'], |
|
106 | + 'description' => esc_html__('Event IDs to get the tickets for.', 'event_espresso'), |
|
107 | + ], |
|
108 | + 'includeDefaultTickets' => [ |
|
109 | + 'type' => 'Boolean', |
|
110 | + 'description' => esc_html__('Whether to add default tickets to the list.', 'event_espresso'), |
|
111 | + ], |
|
112 | + 'search' => [ |
|
113 | + 'type' => 'String', |
|
114 | + 'description' => esc_html__('The search keywords', 'event_espresso'), |
|
115 | + ], |
|
116 | + 'isDefault' => [ |
|
117 | + 'type' => 'Boolean', |
|
118 | + 'description' => esc_html__('Filter the default tickets', 'event_espresso'), |
|
119 | + ], |
|
120 | + 'isRequired' => [ |
|
121 | + 'type' => 'Boolean', |
|
122 | + 'description' => esc_html__('Filter the required tickets', 'event_espresso'), |
|
123 | + ], |
|
124 | + 'isTaxable' => [ |
|
125 | + 'type' => 'Boolean', |
|
126 | + 'description' => esc_html__('Filter the taxable tickets', 'event_espresso'), |
|
127 | + ], |
|
128 | + 'isTrashed' => [ |
|
129 | + 'type' => 'Boolean', |
|
130 | + 'description' => esc_html__('Filter the trashed tickets', 'event_espresso'), |
|
131 | + ], |
|
132 | + ]; |
|
133 | 133 | |
134 | - $newArgs = apply_filters( |
|
135 | - 'FHEE__EventEspresso_core_domain_services_graphql_connections__ticket_args', |
|
136 | - $newArgs, |
|
137 | - $args |
|
138 | - ); |
|
139 | - return array_merge( |
|
140 | - $newArgs, |
|
141 | - $args |
|
142 | - ); |
|
143 | - } |
|
134 | + $newArgs = apply_filters( |
|
135 | + 'FHEE__EventEspresso_core_domain_services_graphql_connections__ticket_args', |
|
136 | + $newArgs, |
|
137 | + $args |
|
138 | + ); |
|
139 | + return array_merge( |
|
140 | + $newArgs, |
|
141 | + $args |
|
142 | + ); |
|
143 | + } |
|
144 | 144 | } |
@@ -38,8 +38,8 @@ |
||
38 | 38 | { |
39 | 39 | return [ |
40 | 40 | 'fromType' => 'RootQuery', |
41 | - 'toType' => $this->namespace . 'Datetime', |
|
42 | - 'fromFieldName' => lcfirst($this->namespace . 'Datetimes'), |
|
41 | + 'toType' => $this->namespace.'Datetime', |
|
42 | + 'fromFieldName' => lcfirst($this->namespace.'Datetimes'), |
|
43 | 43 | 'connectionTypeName' => "{$this->namespace}RootQueryDatetimesConnection", |
44 | 44 | 'connectionArgs' => EventDatetimesConnection::get_connection_args(), |
45 | 45 | 'resolve' => [$this, 'resolveConnection'], |
@@ -18,43 +18,43 @@ |
||
18 | 18 | */ |
19 | 19 | class RootQueryDatetimesConnection extends AbstractRootQueryConnection |
20 | 20 | { |
21 | - /** |
|
22 | - * DatetimeConnection constructor. |
|
23 | - * |
|
24 | - * @param EEM_Datetime $model |
|
25 | - */ |
|
26 | - public function __construct(EEM_Datetime $model) |
|
27 | - { |
|
28 | - parent::__construct($model); |
|
29 | - } |
|
21 | + /** |
|
22 | + * DatetimeConnection constructor. |
|
23 | + * |
|
24 | + * @param EEM_Datetime $model |
|
25 | + */ |
|
26 | + public function __construct(EEM_Datetime $model) |
|
27 | + { |
|
28 | + parent::__construct($model); |
|
29 | + } |
|
30 | 30 | |
31 | 31 | |
32 | - /** |
|
33 | - * @return array |
|
34 | - */ |
|
35 | - public function config() |
|
36 | - { |
|
37 | - return [ |
|
38 | - 'fromType' => 'RootQuery', |
|
39 | - 'toType' => $this->namespace . 'Datetime', |
|
40 | - 'fromFieldName' => lcfirst($this->namespace . 'Datetimes'), |
|
41 | - 'connectionTypeName' => "{$this->namespace}RootQueryDatetimesConnection", |
|
42 | - 'connectionArgs' => EventDatetimesConnection::get_connection_args(), |
|
43 | - 'resolve' => [$this, 'resolveConnection'], |
|
44 | - ]; |
|
45 | - } |
|
32 | + /** |
|
33 | + * @return array |
|
34 | + */ |
|
35 | + public function config() |
|
36 | + { |
|
37 | + return [ |
|
38 | + 'fromType' => 'RootQuery', |
|
39 | + 'toType' => $this->namespace . 'Datetime', |
|
40 | + 'fromFieldName' => lcfirst($this->namespace . 'Datetimes'), |
|
41 | + 'connectionTypeName' => "{$this->namespace}RootQueryDatetimesConnection", |
|
42 | + 'connectionArgs' => EventDatetimesConnection::get_connection_args(), |
|
43 | + 'resolve' => [$this, 'resolveConnection'], |
|
44 | + ]; |
|
45 | + } |
|
46 | 46 | |
47 | 47 | |
48 | - /** |
|
49 | - * @param $entity |
|
50 | - * @param $args |
|
51 | - * @param $context |
|
52 | - * @param $info |
|
53 | - * @return DatetimeConnectionResolver |
|
54 | - * @throws Exception |
|
55 | - */ |
|
56 | - public function getConnectionResolver($entity, $args, $context, $info) |
|
57 | - { |
|
58 | - return new DatetimeConnectionResolver($entity, $args, $context, $info); |
|
59 | - } |
|
48 | + /** |
|
49 | + * @param $entity |
|
50 | + * @param $args |
|
51 | + * @param $context |
|
52 | + * @param $info |
|
53 | + * @return DatetimeConnectionResolver |
|
54 | + * @throws Exception |
|
55 | + */ |
|
56 | + public function getConnectionResolver($entity, $args, $context, $info) |
|
57 | + { |
|
58 | + return new DatetimeConnectionResolver($entity, $args, $context, $info); |
|
59 | + } |
|
60 | 60 | } |
@@ -39,8 +39,8 @@ |
||
39 | 39 | public function config() |
40 | 40 | { |
41 | 41 | return [ |
42 | - 'fromType' => $this->namespace . 'Ticket', |
|
43 | - 'toType' => $this->namespace . 'Datetime', |
|
42 | + 'fromType' => $this->namespace.'Ticket', |
|
43 | + 'toType' => $this->namespace.'Datetime', |
|
44 | 44 | 'fromFieldName' => 'datetimes', |
45 | 45 | 'connectionTypeName' => "{$this->namespace}TicketDatetimesConnection", |
46 | 46 | 'connectionArgs' => EventDatetimesConnection::get_connection_args(), |
@@ -18,44 +18,44 @@ |
||
18 | 18 | */ |
19 | 19 | class TicketDatetimesConnection extends ConnectionBase |
20 | 20 | { |
21 | - /** |
|
22 | - * DatetimeConnection constructor. |
|
23 | - * |
|
24 | - * @param EEM_Datetime $model |
|
25 | - */ |
|
26 | - public function __construct(EEM_Datetime $model) |
|
27 | - { |
|
28 | - parent::__construct($model); |
|
29 | - } |
|
21 | + /** |
|
22 | + * DatetimeConnection constructor. |
|
23 | + * |
|
24 | + * @param EEM_Datetime $model |
|
25 | + */ |
|
26 | + public function __construct(EEM_Datetime $model) |
|
27 | + { |
|
28 | + parent::__construct($model); |
|
29 | + } |
|
30 | 30 | |
31 | 31 | |
32 | - /** |
|
33 | - * @return array |
|
34 | - */ |
|
35 | - public function config() |
|
36 | - { |
|
37 | - return [ |
|
38 | - 'fromType' => $this->namespace . 'Ticket', |
|
39 | - 'toType' => $this->namespace . 'Datetime', |
|
40 | - 'fromFieldName' => 'datetimes', |
|
41 | - 'connectionTypeName' => "{$this->namespace}TicketDatetimesConnection", |
|
42 | - 'connectionArgs' => EventDatetimesConnection::get_connection_args(), |
|
43 | - 'resolve' => [$this, 'resolveConnection'], |
|
44 | - ]; |
|
45 | - } |
|
32 | + /** |
|
33 | + * @return array |
|
34 | + */ |
|
35 | + public function config() |
|
36 | + { |
|
37 | + return [ |
|
38 | + 'fromType' => $this->namespace . 'Ticket', |
|
39 | + 'toType' => $this->namespace . 'Datetime', |
|
40 | + 'fromFieldName' => 'datetimes', |
|
41 | + 'connectionTypeName' => "{$this->namespace}TicketDatetimesConnection", |
|
42 | + 'connectionArgs' => EventDatetimesConnection::get_connection_args(), |
|
43 | + 'resolve' => [$this, 'resolveConnection'], |
|
44 | + ]; |
|
45 | + } |
|
46 | 46 | |
47 | 47 | |
48 | - /** |
|
49 | - * @param $entity |
|
50 | - * @param $args |
|
51 | - * @param $context |
|
52 | - * @param $info |
|
53 | - * @return array|Deferred|mixed |
|
54 | - * @throws Exception |
|
55 | - */ |
|
56 | - public function resolveConnection($entity, $args, $context, $info) |
|
57 | - { |
|
58 | - $resolver = new DatetimeConnectionResolver($entity, $args, $context, $info); |
|
59 | - return $resolver->get_connection(); |
|
60 | - } |
|
48 | + /** |
|
49 | + * @param $entity |
|
50 | + * @param $args |
|
51 | + * @param $context |
|
52 | + * @param $info |
|
53 | + * @return array|Deferred|mixed |
|
54 | + * @throws Exception |
|
55 | + */ |
|
56 | + public function resolveConnection($entity, $args, $context, $info) |
|
57 | + { |
|
58 | + $resolver = new DatetimeConnectionResolver($entity, $args, $context, $info); |
|
59 | + return $resolver->get_connection(); |
|
60 | + } |
|
61 | 61 | } |
@@ -39,8 +39,8 @@ |
||
39 | 39 | public function config() |
40 | 40 | { |
41 | 41 | return [ |
42 | - 'fromType' => $this->namespace . 'Event', |
|
43 | - 'toType' => $this->namespace . 'Datetime', |
|
42 | + 'fromType' => $this->namespace.'Event', |
|
43 | + 'toType' => $this->namespace.'Datetime', |
|
44 | 44 | 'fromFieldName' => 'datetimes', |
45 | 45 | 'connectionTypeName' => "{$this->namespace}EventDatetimesConnection", |
46 | 46 | 'connectionArgs' => self::get_connection_args(), |
@@ -18,119 +18,119 @@ |
||
18 | 18 | */ |
19 | 19 | class EventDatetimesConnection extends ConnectionBase |
20 | 20 | { |
21 | - /** |
|
22 | - * DatetimeConnection constructor. |
|
23 | - * |
|
24 | - * @param EEM_Datetime $model |
|
25 | - */ |
|
26 | - public function __construct(EEM_Datetime $model) |
|
27 | - { |
|
28 | - parent::__construct($model); |
|
29 | - } |
|
21 | + /** |
|
22 | + * DatetimeConnection constructor. |
|
23 | + * |
|
24 | + * @param EEM_Datetime $model |
|
25 | + */ |
|
26 | + public function __construct(EEM_Datetime $model) |
|
27 | + { |
|
28 | + parent::__construct($model); |
|
29 | + } |
|
30 | 30 | |
31 | 31 | |
32 | - /** |
|
33 | - * @return array |
|
34 | - */ |
|
35 | - public function config() |
|
36 | - { |
|
37 | - return [ |
|
38 | - 'fromType' => $this->namespace . 'Event', |
|
39 | - 'toType' => $this->namespace . 'Datetime', |
|
40 | - 'fromFieldName' => 'datetimes', |
|
41 | - 'connectionTypeName' => "{$this->namespace}EventDatetimesConnection", |
|
42 | - 'connectionArgs' => self::get_connection_args(), |
|
43 | - 'resolve' => [$this, 'resolveConnection'], |
|
44 | - ]; |
|
45 | - } |
|
32 | + /** |
|
33 | + * @return array |
|
34 | + */ |
|
35 | + public function config() |
|
36 | + { |
|
37 | + return [ |
|
38 | + 'fromType' => $this->namespace . 'Event', |
|
39 | + 'toType' => $this->namespace . 'Datetime', |
|
40 | + 'fromFieldName' => 'datetimes', |
|
41 | + 'connectionTypeName' => "{$this->namespace}EventDatetimesConnection", |
|
42 | + 'connectionArgs' => self::get_connection_args(), |
|
43 | + 'resolve' => [$this, 'resolveConnection'], |
|
44 | + ]; |
|
45 | + } |
|
46 | 46 | |
47 | 47 | |
48 | - /** |
|
49 | - * @param $entity |
|
50 | - * @param $args |
|
51 | - * @param $context |
|
52 | - * @param $info |
|
53 | - * @return array|Deferred|mixed |
|
54 | - * @throws Exception |
|
55 | - */ |
|
56 | - public function resolveConnection($entity, $args, $context, $info) |
|
57 | - { |
|
58 | - $resolver = new DatetimeConnectionResolver($entity, $args, $context, $info); |
|
59 | - return $resolver->get_connection(); |
|
60 | - } |
|
48 | + /** |
|
49 | + * @param $entity |
|
50 | + * @param $args |
|
51 | + * @param $context |
|
52 | + * @param $info |
|
53 | + * @return array|Deferred|mixed |
|
54 | + * @throws Exception |
|
55 | + */ |
|
56 | + public function resolveConnection($entity, $args, $context, $info) |
|
57 | + { |
|
58 | + $resolver = new DatetimeConnectionResolver($entity, $args, $context, $info); |
|
59 | + return $resolver->get_connection(); |
|
60 | + } |
|
61 | 61 | |
62 | - /** |
|
63 | - * Given an optional array of args, this returns the args to be used in the connection |
|
64 | - * |
|
65 | - * @param array $args The args to modify the defaults |
|
66 | - * @return array |
|
67 | - */ |
|
68 | - // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps |
|
69 | - public static function get_connection_args($args = []) |
|
70 | - { |
|
71 | - $newArgs = [ |
|
72 | - 'orderby' => [ |
|
73 | - 'type' => ['list_of' => 'EspressoDatetimesConnectionOrderbyInput'], |
|
74 | - 'description' => esc_html__('What parameter to use to order the objects by.', 'event_espresso'), |
|
75 | - ], |
|
76 | - 'event' => [ |
|
77 | - 'type' => 'ID', |
|
78 | - 'description' => esc_html__('Globally unique event ID to get the datetimes for.', 'event_espresso'), |
|
79 | - ], |
|
80 | - 'eventIn' => [ |
|
81 | - 'type' => ['list_of' => 'ID'], |
|
82 | - 'description' => esc_html__('Globally unique event IDs to get the datetimes for.', 'event_espresso'), |
|
83 | - ], |
|
84 | - 'eventId' => [ |
|
85 | - 'type' => 'Int', |
|
86 | - 'description' => esc_html__('Event ID to get the datetimes for.', 'event_espresso'), |
|
87 | - ], |
|
88 | - 'eventIdIn' => [ |
|
89 | - 'type' => ['list_of' => 'Int'], |
|
90 | - 'description' => esc_html__('Event IDs to get the datetimes for.', 'event_espresso'), |
|
91 | - ], |
|
92 | - 'ticket' => [ |
|
93 | - 'type' => 'ID', |
|
94 | - 'description' => esc_html__('Globally unique ticket ID to get the datetimes for.', 'event_espresso'), |
|
95 | - ], |
|
96 | - 'ticketIn' => [ |
|
97 | - 'type' => ['list_of' => 'ID'], |
|
98 | - 'description' => esc_html__('Globally unique ticket IDs to get the datetimes for.', 'event_espresso'), |
|
99 | - ], |
|
100 | - 'ticketId' => [ |
|
101 | - 'type' => 'Int', |
|
102 | - 'description' => esc_html__('Ticket ID to get the datetimes for.', 'event_espresso'), |
|
103 | - ], |
|
104 | - 'ticketIdIn' => [ |
|
105 | - 'type' => ['list_of' => 'Int'], |
|
106 | - 'description' => esc_html__('Ticket IDs to get the datetimes for.', 'event_espresso'), |
|
107 | - ], |
|
108 | - 'upcoming' => [ |
|
109 | - 'type' => 'Boolean', |
|
110 | - 'description' => esc_html__('Datetimes which are upcoming.', 'event_espresso'), |
|
111 | - ], |
|
112 | - 'active' => [ |
|
113 | - 'type' => 'Boolean', |
|
114 | - 'description' => esc_html__('Datetimes which are active.', 'event_espresso'), |
|
115 | - ], |
|
116 | - 'expired' => [ |
|
117 | - 'type' => 'Boolean', |
|
118 | - 'description' => esc_html__('Datetimes which are expired.', 'event_espresso'), |
|
119 | - ], |
|
120 | - 'search' => [ |
|
121 | - 'type' => 'String', |
|
122 | - 'description' => esc_html__('The search keywords', 'event_espresso'), |
|
123 | - ], |
|
124 | - ]; |
|
62 | + /** |
|
63 | + * Given an optional array of args, this returns the args to be used in the connection |
|
64 | + * |
|
65 | + * @param array $args The args to modify the defaults |
|
66 | + * @return array |
|
67 | + */ |
|
68 | + // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps |
|
69 | + public static function get_connection_args($args = []) |
|
70 | + { |
|
71 | + $newArgs = [ |
|
72 | + 'orderby' => [ |
|
73 | + 'type' => ['list_of' => 'EspressoDatetimesConnectionOrderbyInput'], |
|
74 | + 'description' => esc_html__('What parameter to use to order the objects by.', 'event_espresso'), |
|
75 | + ], |
|
76 | + 'event' => [ |
|
77 | + 'type' => 'ID', |
|
78 | + 'description' => esc_html__('Globally unique event ID to get the datetimes for.', 'event_espresso'), |
|
79 | + ], |
|
80 | + 'eventIn' => [ |
|
81 | + 'type' => ['list_of' => 'ID'], |
|
82 | + 'description' => esc_html__('Globally unique event IDs to get the datetimes for.', 'event_espresso'), |
|
83 | + ], |
|
84 | + 'eventId' => [ |
|
85 | + 'type' => 'Int', |
|
86 | + 'description' => esc_html__('Event ID to get the datetimes for.', 'event_espresso'), |
|
87 | + ], |
|
88 | + 'eventIdIn' => [ |
|
89 | + 'type' => ['list_of' => 'Int'], |
|
90 | + 'description' => esc_html__('Event IDs to get the datetimes for.', 'event_espresso'), |
|
91 | + ], |
|
92 | + 'ticket' => [ |
|
93 | + 'type' => 'ID', |
|
94 | + 'description' => esc_html__('Globally unique ticket ID to get the datetimes for.', 'event_espresso'), |
|
95 | + ], |
|
96 | + 'ticketIn' => [ |
|
97 | + 'type' => ['list_of' => 'ID'], |
|
98 | + 'description' => esc_html__('Globally unique ticket IDs to get the datetimes for.', 'event_espresso'), |
|
99 | + ], |
|
100 | + 'ticketId' => [ |
|
101 | + 'type' => 'Int', |
|
102 | + 'description' => esc_html__('Ticket ID to get the datetimes for.', 'event_espresso'), |
|
103 | + ], |
|
104 | + 'ticketIdIn' => [ |
|
105 | + 'type' => ['list_of' => 'Int'], |
|
106 | + 'description' => esc_html__('Ticket IDs to get the datetimes for.', 'event_espresso'), |
|
107 | + ], |
|
108 | + 'upcoming' => [ |
|
109 | + 'type' => 'Boolean', |
|
110 | + 'description' => esc_html__('Datetimes which are upcoming.', 'event_espresso'), |
|
111 | + ], |
|
112 | + 'active' => [ |
|
113 | + 'type' => 'Boolean', |
|
114 | + 'description' => esc_html__('Datetimes which are active.', 'event_espresso'), |
|
115 | + ], |
|
116 | + 'expired' => [ |
|
117 | + 'type' => 'Boolean', |
|
118 | + 'description' => esc_html__('Datetimes which are expired.', 'event_espresso'), |
|
119 | + ], |
|
120 | + 'search' => [ |
|
121 | + 'type' => 'String', |
|
122 | + 'description' => esc_html__('The search keywords', 'event_espresso'), |
|
123 | + ], |
|
124 | + ]; |
|
125 | 125 | |
126 | - $newArgs = apply_filters( |
|
127 | - 'FHEE__EventEspresso_core_domain_services_graphql_connections__datetime_args', |
|
128 | - $newArgs, |
|
129 | - $args |
|
130 | - ); |
|
131 | - return array_merge( |
|
132 | - $newArgs, |
|
133 | - $args |
|
134 | - ); |
|
135 | - } |
|
126 | + $newArgs = apply_filters( |
|
127 | + 'FHEE__EventEspresso_core_domain_services_graphql_connections__datetime_args', |
|
128 | + $newArgs, |
|
129 | + $args |
|
130 | + ); |
|
131 | + return array_merge( |
|
132 | + $newArgs, |
|
133 | + $args |
|
134 | + ); |
|
135 | + } |
|
136 | 136 | } |
@@ -39,8 +39,8 @@ |
||
39 | 39 | public function config() |
40 | 40 | { |
41 | 41 | return [ |
42 | - 'fromType' => $this->namespace . 'Event', |
|
43 | - 'toType' => $this->namespace . 'Venue', |
|
42 | + 'fromType' => $this->namespace.'Event', |
|
43 | + 'toType' => $this->namespace.'Venue', |
|
44 | 44 | 'fromFieldName' => 'venues', |
45 | 45 | 'connectionTypeName' => "{$this->namespace}EventVenuesConnection", |
46 | 46 | 'resolve' => [$this, 'resolveConnection'], |
@@ -18,43 +18,43 @@ |
||
18 | 18 | */ |
19 | 19 | class EventVenuesConnection extends ConnectionBase |
20 | 20 | { |
21 | - /** |
|
22 | - * DatetimeConnection constructor. |
|
23 | - * |
|
24 | - * @param EEM_Venue $model |
|
25 | - */ |
|
26 | - public function __construct(EEM_Venue $model) |
|
27 | - { |
|
28 | - parent::__construct($model); |
|
29 | - } |
|
21 | + /** |
|
22 | + * DatetimeConnection constructor. |
|
23 | + * |
|
24 | + * @param EEM_Venue $model |
|
25 | + */ |
|
26 | + public function __construct(EEM_Venue $model) |
|
27 | + { |
|
28 | + parent::__construct($model); |
|
29 | + } |
|
30 | 30 | |
31 | 31 | |
32 | - /** |
|
33 | - * @return array |
|
34 | - */ |
|
35 | - public function config() |
|
36 | - { |
|
37 | - return [ |
|
38 | - 'fromType' => $this->namespace . 'Event', |
|
39 | - 'toType' => $this->namespace . 'Venue', |
|
40 | - 'fromFieldName' => 'venues', |
|
41 | - 'connectionTypeName' => "{$this->namespace}EventVenuesConnection", |
|
42 | - 'resolve' => [$this, 'resolveConnection'], |
|
43 | - ]; |
|
44 | - } |
|
32 | + /** |
|
33 | + * @return array |
|
34 | + */ |
|
35 | + public function config() |
|
36 | + { |
|
37 | + return [ |
|
38 | + 'fromType' => $this->namespace . 'Event', |
|
39 | + 'toType' => $this->namespace . 'Venue', |
|
40 | + 'fromFieldName' => 'venues', |
|
41 | + 'connectionTypeName' => "{$this->namespace}EventVenuesConnection", |
|
42 | + 'resolve' => [$this, 'resolveConnection'], |
|
43 | + ]; |
|
44 | + } |
|
45 | 45 | |
46 | 46 | |
47 | - /** |
|
48 | - * @param $entity |
|
49 | - * @param $args |
|
50 | - * @param $context |
|
51 | - * @param $info |
|
52 | - * @return array|Deferred|mixed |
|
53 | - * @throws Exception |
|
54 | - */ |
|
55 | - public function resolveConnection($entity, $args, $context, $info) |
|
56 | - { |
|
57 | - $resolver = new VenueConnectionResolver($entity, $args, $context, $info); |
|
58 | - return $resolver->get_connection(); |
|
59 | - } |
|
47 | + /** |
|
48 | + * @param $entity |
|
49 | + * @param $args |
|
50 | + * @param $context |
|
51 | + * @param $info |
|
52 | + * @return array|Deferred|mixed |
|
53 | + * @throws Exception |
|
54 | + */ |
|
55 | + public function resolveConnection($entity, $args, $context, $info) |
|
56 | + { |
|
57 | + $resolver = new VenueConnectionResolver($entity, $args, $context, $info); |
|
58 | + return $resolver->get_connection(); |
|
59 | + } |
|
60 | 60 | } |
@@ -38,8 +38,8 @@ |
||
38 | 38 | { |
39 | 39 | return [ |
40 | 40 | 'fromType' => 'RootQuery', |
41 | - 'toType' => $this->namespace . 'Ticket', |
|
42 | - 'fromFieldName' => lcfirst($this->namespace) . 'Tickets', |
|
41 | + 'toType' => $this->namespace.'Ticket', |
|
42 | + 'fromFieldName' => lcfirst($this->namespace).'Tickets', |
|
43 | 43 | 'connectionTypeName' => "{$this->namespace}RootQueryTicketsConnection", |
44 | 44 | 'connectionArgs' => DatetimeTicketsConnection::get_connection_args(), |
45 | 45 | 'resolve' => [$this, 'resolveConnection'], |
@@ -18,43 +18,43 @@ |
||
18 | 18 | */ |
19 | 19 | class RootQueryTicketsConnection extends AbstractRootQueryConnection |
20 | 20 | { |
21 | - /** |
|
22 | - * TicketConnection constructor. |
|
23 | - * |
|
24 | - * @param EEM_Ticket $model |
|
25 | - */ |
|
26 | - public function __construct(EEM_Ticket $model) |
|
27 | - { |
|
28 | - parent::__construct($model); |
|
29 | - } |
|
21 | + /** |
|
22 | + * TicketConnection constructor. |
|
23 | + * |
|
24 | + * @param EEM_Ticket $model |
|
25 | + */ |
|
26 | + public function __construct(EEM_Ticket $model) |
|
27 | + { |
|
28 | + parent::__construct($model); |
|
29 | + } |
|
30 | 30 | |
31 | 31 | |
32 | - /** |
|
33 | - * @return array |
|
34 | - */ |
|
35 | - public function config() |
|
36 | - { |
|
37 | - return [ |
|
38 | - 'fromType' => 'RootQuery', |
|
39 | - 'toType' => $this->namespace . 'Ticket', |
|
40 | - 'fromFieldName' => lcfirst($this->namespace) . 'Tickets', |
|
41 | - 'connectionTypeName' => "{$this->namespace}RootQueryTicketsConnection", |
|
42 | - 'connectionArgs' => DatetimeTicketsConnection::get_connection_args(), |
|
43 | - 'resolve' => [$this, 'resolveConnection'], |
|
44 | - ]; |
|
45 | - } |
|
32 | + /** |
|
33 | + * @return array |
|
34 | + */ |
|
35 | + public function config() |
|
36 | + { |
|
37 | + return [ |
|
38 | + 'fromType' => 'RootQuery', |
|
39 | + 'toType' => $this->namespace . 'Ticket', |
|
40 | + 'fromFieldName' => lcfirst($this->namespace) . 'Tickets', |
|
41 | + 'connectionTypeName' => "{$this->namespace}RootQueryTicketsConnection", |
|
42 | + 'connectionArgs' => DatetimeTicketsConnection::get_connection_args(), |
|
43 | + 'resolve' => [$this, 'resolveConnection'], |
|
44 | + ]; |
|
45 | + } |
|
46 | 46 | |
47 | 47 | |
48 | - /** |
|
49 | - * @param $entity |
|
50 | - * @param $args |
|
51 | - * @param $context |
|
52 | - * @param $info |
|
53 | - * @return TicketConnectionResolver |
|
54 | - * @throws Exception |
|
55 | - */ |
|
56 | - public function getConnectionResolver($entity, $args, $context, $info) |
|
57 | - { |
|
58 | - return new TicketConnectionResolver($entity, $args, $context, $info); |
|
59 | - } |
|
48 | + /** |
|
49 | + * @param $entity |
|
50 | + * @param $args |
|
51 | + * @param $context |
|
52 | + * @param $info |
|
53 | + * @return TicketConnectionResolver |
|
54 | + * @throws Exception |
|
55 | + */ |
|
56 | + public function getConnectionResolver($entity, $args, $context, $info) |
|
57 | + { |
|
58 | + return new TicketConnectionResolver($entity, $args, $context, $info); |
|
59 | + } |
|
60 | 60 | } |