Completed
Branch barista (73bcc5)
by
unknown
41:49 queued 32:55
created
core/domain/services/graphql/data/mutations/VenueMutation.php 2 patches
Indentation   +98 added lines, -98 removed lines patch added patch discarded remove patch
@@ -11,102 +11,102 @@
 block discarded – undo
11 11
 class VenueMutation
12 12
 {
13 13
 
14
-    /**
15
-     * Maps the GraphQL input to a format that the model functions can use
16
-     *
17
-     * @param array  $input         Data coming from the GraphQL mutation query input
18
-     * @param string $mutation_name Name of the mutation being performed
19
-     * @return array
20
-     */
21
-    public static function prepareFields(array $input, $mutation_name)
22
-    {
23
-
24
-        $args = [];
25
-
26
-        if (! empty($input['name'])) {
27
-            $args['VNU_name'] = sanitize_text_field($input['name']);
28
-        }
29
-
30
-        if (! empty($input['description'])) {
31
-            $args['VNU_desc'] = wp_kses_post($input['description']);
32
-        }
33
-
34
-        if (! empty($input['shortDescription'])) {
35
-            $args['VNU_short_desc'] = sanitize_text_field($input['shortDescription']);
36
-        }
37
-
38
-        if (! empty($input['identifier'])) {
39
-            $args['VNU_identifier'] = sanitize_title($input['identifier']);
40
-        }
41
-
42
-        if (! empty($input['created'])) {
43
-            $args['VNU_created'] = new DateTime(sanitize_text_field($input['created']));
44
-        }
45
-
46
-        if (! empty($input['order'])) {
47
-            $args['VNU_order'] = absint($input['order']);
48
-        }
49
-
50
-        if (! empty($input['wpUser'])) {
51
-            $args['VNU_wp_user'] = absint($input['wpUser']);
52
-        }
53
-
54
-        if (! empty($input['address'])) {
55
-            $args['VNU_address'] = sanitize_text_field($input['address']);
56
-        }
57
-
58
-        if (! empty($input['address2'])) {
59
-            $args['VNU_address2'] = sanitize_text_field($input['address2']);
60
-        }
61
-
62
-        if (! empty($input['city'])) {
63
-            $args['VNU_city'] = sanitize_text_field($input['city']);
64
-        }
65
-
66
-        if (! empty($input['state'])) {
67
-            $args['STA_ID'] = absint($input['state']);
68
-        }
69
-
70
-        if (! empty($input['country'])) {
71
-            $args['CNT_ISO'] = sanitize_text_field($input['country']);
72
-        }
73
-
74
-        if (! empty($input['zip'])) {
75
-            $args['VNU_zip'] = sanitize_text_field($input['zip']);
76
-        }
77
-
78
-        if (! empty($input['capacity'])) {
79
-            $args['VNU_capacity'] = absint($input['capacity']);
80
-        }
81
-
82
-        if (! empty($input['phone'])) {
83
-            $args['VNU_phone'] = sanitize_text_field($input['phone']);
84
-        }
85
-
86
-        if (! empty($input['virtualPhone'])) {
87
-            $args['VNU_virtual_phone'] = sanitize_text_field($input['virtualPhone']);
88
-        }
89
-
90
-        if (! empty($input['url'])) {
91
-            $args['VNU_url'] = sanitize_text_field($input['url']);
92
-        }
93
-
94
-        if (! empty($input['virtualUrl'])) {
95
-            $args['VNU_virtual_url'] = sanitize_text_field($input['virtualUrl']);
96
-        }
97
-
98
-        if (! empty($input['googleMapLink'])) {
99
-            $args['VNU_google_map_link'] = sanitize_text_field($input['googleMapLink']);
100
-        }
101
-
102
-        if (! empty($input['enableForGmap'])) {
103
-            $args['VNU_enable_for_gmap'] = (bool) $input['enableForGmap'];
104
-        }
105
-
106
-        return apply_filters(
107
-            'FHEE__EventEspresso_core_domain_services_graphql_data_mutations__venue_args',
108
-            $args,
109
-            $input
110
-        );
111
-    }
14
+	/**
15
+	 * Maps the GraphQL input to a format that the model functions can use
16
+	 *
17
+	 * @param array  $input         Data coming from the GraphQL mutation query input
18
+	 * @param string $mutation_name Name of the mutation being performed
19
+	 * @return array
20
+	 */
21
+	public static function prepareFields(array $input, $mutation_name)
22
+	{
23
+
24
+		$args = [];
25
+
26
+		if (! empty($input['name'])) {
27
+			$args['VNU_name'] = sanitize_text_field($input['name']);
28
+		}
29
+
30
+		if (! empty($input['description'])) {
31
+			$args['VNU_desc'] = wp_kses_post($input['description']);
32
+		}
33
+
34
+		if (! empty($input['shortDescription'])) {
35
+			$args['VNU_short_desc'] = sanitize_text_field($input['shortDescription']);
36
+		}
37
+
38
+		if (! empty($input['identifier'])) {
39
+			$args['VNU_identifier'] = sanitize_title($input['identifier']);
40
+		}
41
+
42
+		if (! empty($input['created'])) {
43
+			$args['VNU_created'] = new DateTime(sanitize_text_field($input['created']));
44
+		}
45
+
46
+		if (! empty($input['order'])) {
47
+			$args['VNU_order'] = absint($input['order']);
48
+		}
49
+
50
+		if (! empty($input['wpUser'])) {
51
+			$args['VNU_wp_user'] = absint($input['wpUser']);
52
+		}
53
+
54
+		if (! empty($input['address'])) {
55
+			$args['VNU_address'] = sanitize_text_field($input['address']);
56
+		}
57
+
58
+		if (! empty($input['address2'])) {
59
+			$args['VNU_address2'] = sanitize_text_field($input['address2']);
60
+		}
61
+
62
+		if (! empty($input['city'])) {
63
+			$args['VNU_city'] = sanitize_text_field($input['city']);
64
+		}
65
+
66
+		if (! empty($input['state'])) {
67
+			$args['STA_ID'] = absint($input['state']);
68
+		}
69
+
70
+		if (! empty($input['country'])) {
71
+			$args['CNT_ISO'] = sanitize_text_field($input['country']);
72
+		}
73
+
74
+		if (! empty($input['zip'])) {
75
+			$args['VNU_zip'] = sanitize_text_field($input['zip']);
76
+		}
77
+
78
+		if (! empty($input['capacity'])) {
79
+			$args['VNU_capacity'] = absint($input['capacity']);
80
+		}
81
+
82
+		if (! empty($input['phone'])) {
83
+			$args['VNU_phone'] = sanitize_text_field($input['phone']);
84
+		}
85
+
86
+		if (! empty($input['virtualPhone'])) {
87
+			$args['VNU_virtual_phone'] = sanitize_text_field($input['virtualPhone']);
88
+		}
89
+
90
+		if (! empty($input['url'])) {
91
+			$args['VNU_url'] = sanitize_text_field($input['url']);
92
+		}
93
+
94
+		if (! empty($input['virtualUrl'])) {
95
+			$args['VNU_virtual_url'] = sanitize_text_field($input['virtualUrl']);
96
+		}
97
+
98
+		if (! empty($input['googleMapLink'])) {
99
+			$args['VNU_google_map_link'] = sanitize_text_field($input['googleMapLink']);
100
+		}
101
+
102
+		if (! empty($input['enableForGmap'])) {
103
+			$args['VNU_enable_for_gmap'] = (bool) $input['enableForGmap'];
104
+		}
105
+
106
+		return apply_filters(
107
+			'FHEE__EventEspresso_core_domain_services_graphql_data_mutations__venue_args',
108
+			$args,
109
+			$input
110
+		);
111
+	}
112 112
 }
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -23,83 +23,83 @@
 block discarded – undo
23 23
 
24 24
         $args = [];
25 25
 
26
-        if (! empty($input['name'])) {
26
+        if ( ! empty($input['name'])) {
27 27
             $args['VNU_name'] = sanitize_text_field($input['name']);
28 28
         }
29 29
 
30
-        if (! empty($input['description'])) {
30
+        if ( ! empty($input['description'])) {
31 31
             $args['VNU_desc'] = wp_kses_post($input['description']);
32 32
         }
33 33
 
34
-        if (! empty($input['shortDescription'])) {
34
+        if ( ! empty($input['shortDescription'])) {
35 35
             $args['VNU_short_desc'] = sanitize_text_field($input['shortDescription']);
36 36
         }
37 37
 
38
-        if (! empty($input['identifier'])) {
38
+        if ( ! empty($input['identifier'])) {
39 39
             $args['VNU_identifier'] = sanitize_title($input['identifier']);
40 40
         }
41 41
 
42
-        if (! empty($input['created'])) {
42
+        if ( ! empty($input['created'])) {
43 43
             $args['VNU_created'] = new DateTime(sanitize_text_field($input['created']));
44 44
         }
45 45
 
46
-        if (! empty($input['order'])) {
46
+        if ( ! empty($input['order'])) {
47 47
             $args['VNU_order'] = absint($input['order']);
48 48
         }
49 49
 
50
-        if (! empty($input['wpUser'])) {
50
+        if ( ! empty($input['wpUser'])) {
51 51
             $args['VNU_wp_user'] = absint($input['wpUser']);
52 52
         }
53 53
 
54
-        if (! empty($input['address'])) {
54
+        if ( ! empty($input['address'])) {
55 55
             $args['VNU_address'] = sanitize_text_field($input['address']);
56 56
         }
57 57
 
58
-        if (! empty($input['address2'])) {
58
+        if ( ! empty($input['address2'])) {
59 59
             $args['VNU_address2'] = sanitize_text_field($input['address2']);
60 60
         }
61 61
 
62
-        if (! empty($input['city'])) {
62
+        if ( ! empty($input['city'])) {
63 63
             $args['VNU_city'] = sanitize_text_field($input['city']);
64 64
         }
65 65
 
66
-        if (! empty($input['state'])) {
66
+        if ( ! empty($input['state'])) {
67 67
             $args['STA_ID'] = absint($input['state']);
68 68
         }
69 69
 
70
-        if (! empty($input['country'])) {
70
+        if ( ! empty($input['country'])) {
71 71
             $args['CNT_ISO'] = sanitize_text_field($input['country']);
72 72
         }
73 73
 
74
-        if (! empty($input['zip'])) {
74
+        if ( ! empty($input['zip'])) {
75 75
             $args['VNU_zip'] = sanitize_text_field($input['zip']);
76 76
         }
77 77
 
78
-        if (! empty($input['capacity'])) {
78
+        if ( ! empty($input['capacity'])) {
79 79
             $args['VNU_capacity'] = absint($input['capacity']);
80 80
         }
81 81
 
82
-        if (! empty($input['phone'])) {
82
+        if ( ! empty($input['phone'])) {
83 83
             $args['VNU_phone'] = sanitize_text_field($input['phone']);
84 84
         }
85 85
 
86
-        if (! empty($input['virtualPhone'])) {
86
+        if ( ! empty($input['virtualPhone'])) {
87 87
             $args['VNU_virtual_phone'] = sanitize_text_field($input['virtualPhone']);
88 88
         }
89 89
 
90
-        if (! empty($input['url'])) {
90
+        if ( ! empty($input['url'])) {
91 91
             $args['VNU_url'] = sanitize_text_field($input['url']);
92 92
         }
93 93
 
94
-        if (! empty($input['virtualUrl'])) {
94
+        if ( ! empty($input['virtualUrl'])) {
95 95
             $args['VNU_virtual_url'] = sanitize_text_field($input['virtualUrl']);
96 96
         }
97 97
 
98
-        if (! empty($input['googleMapLink'])) {
98
+        if ( ! empty($input['googleMapLink'])) {
99 99
             $args['VNU_google_map_link'] = sanitize_text_field($input['googleMapLink']);
100 100
         }
101 101
 
102
-        if (! empty($input['enableForGmap'])) {
102
+        if ( ! empty($input['enableForGmap'])) {
103 103
             $args['VNU_enable_for_gmap'] = (bool) $input['enableForGmap'];
104 104
         }
105 105
 
Please login to merge, or discard this patch.
core/domain/services/graphql/data/mutations/EventMutation.php 1 patch
Indentation   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -14,82 +14,82 @@
 block discarded – undo
14 14
 class EventMutation
15 15
 {
16 16
 
17
-    /**
18
-     * Maps the GraphQL input to a format that the model functions can use
19
-     *
20
-     * @param array  $input         Data coming from the GraphQL mutation query input
21
-     * @param string $mutation_name Name of the mutation being performed
22
-     * @return array
23
-     * @throws Exception
24
-     */
25
-    public static function prepareFields(array $input, $mutation_name)
26
-    {
27
-        $args = [];
28
-
29
-        if (! empty($input['additionalLimit'])) {
30
-            $args['EVT_additional_limit'] = absint($input['additionalLimit']);
31
-        }
32
-
33
-        if (array_key_exists('allowOverflow', $input)) {
34
-            $args['EVT_allow_overflow'] = (bool) ($input['allowOverflow']);
35
-        }
36
-
37
-        if (! empty($input['description'])) {
38
-            $args['EVT_desc'] = wp_kses_post($input['description']);
39
-        }
40
-
41
-        if (array_key_exists('displayDescription', $input)) {
42
-            $args['EVT_display_desc'] = (bool) ($input['displayDescription']);
43
-        }
44
-
45
-        if (array_key_exists('displayTicketSelector', $input)) {
46
-            $args['EVT_display_ticket_selector'] = (bool) ($input['displayTicketSelector']);
47
-        }
48
-
49
-        if (array_key_exists('donations', $input)) {
50
-            $args['EVT_donations'] = (bool) ($input['donations']);
51
-        }
52
-
53
-        if (! empty($input['externalUrl'])) {
54
-            $args['EVT_external_URL'] = sanitize_text_field($input['externalUrl']);
55
-        }
56
-
57
-        if (array_key_exists('memberOnly', $input)) {
58
-            $args['EVT_member_only'] = (bool) ($input['memberOnly']);
59
-        }
60
-
61
-        if (! empty($input['name'])) {
62
-            $args['EVT_name'] = sanitize_text_field($input['name']);
63
-        }
64
-
65
-        if (! empty($input['order'])) {
66
-            $args['EVT_order'] = absint($input['order']);
67
-        }
68
-
69
-        if (! empty($input['phone'])) {
70
-            $args['EVT_phone'] = sanitize_text_field($input['phone']);
71
-        }
72
-
73
-        if (! empty($input['shortDescription'])) {
74
-            $args['EVT_short_desc'] = sanitize_post_field('post_excerpt', $input['shortDescription'], null, $context = 'db');
75
-        }
76
-
77
-        if (! empty($input['timezoneString'])) {
78
-            $args['EVT_timezone_string'] = sanitize_text_field($input['timezoneString']);
79
-        }
80
-
81
-        if (! empty($input['visibleOn'])) {
82
-            $args['EVT_visible_on'] = new DateTime(sanitize_text_field($input['visibleOn']));
83
-        }
84
-
85
-        if (! empty($input['wpUser'])) {
86
-            $args['EVT_wp_user'] = absint($input['wpUser']);
87
-        }
88
-
89
-        return apply_filters(
90
-            'FHEE__EventEspresso_core_domain_services_graphql_data_mutations__event_args',
91
-            $args,
92
-            $input
93
-        );
94
-    }
17
+	/**
18
+	 * Maps the GraphQL input to a format that the model functions can use
19
+	 *
20
+	 * @param array  $input         Data coming from the GraphQL mutation query input
21
+	 * @param string $mutation_name Name of the mutation being performed
22
+	 * @return array
23
+	 * @throws Exception
24
+	 */
25
+	public static function prepareFields(array $input, $mutation_name)
26
+	{
27
+		$args = [];
28
+
29
+		if (! empty($input['additionalLimit'])) {
30
+			$args['EVT_additional_limit'] = absint($input['additionalLimit']);
31
+		}
32
+
33
+		if (array_key_exists('allowOverflow', $input)) {
34
+			$args['EVT_allow_overflow'] = (bool) ($input['allowOverflow']);
35
+		}
36
+
37
+		if (! empty($input['description'])) {
38
+			$args['EVT_desc'] = wp_kses_post($input['description']);
39
+		}
40
+
41
+		if (array_key_exists('displayDescription', $input)) {
42
+			$args['EVT_display_desc'] = (bool) ($input['displayDescription']);
43
+		}
44
+
45
+		if (array_key_exists('displayTicketSelector', $input)) {
46
+			$args['EVT_display_ticket_selector'] = (bool) ($input['displayTicketSelector']);
47
+		}
48
+
49
+		if (array_key_exists('donations', $input)) {
50
+			$args['EVT_donations'] = (bool) ($input['donations']);
51
+		}
52
+
53
+		if (! empty($input['externalUrl'])) {
54
+			$args['EVT_external_URL'] = sanitize_text_field($input['externalUrl']);
55
+		}
56
+
57
+		if (array_key_exists('memberOnly', $input)) {
58
+			$args['EVT_member_only'] = (bool) ($input['memberOnly']);
59
+		}
60
+
61
+		if (! empty($input['name'])) {
62
+			$args['EVT_name'] = sanitize_text_field($input['name']);
63
+		}
64
+
65
+		if (! empty($input['order'])) {
66
+			$args['EVT_order'] = absint($input['order']);
67
+		}
68
+
69
+		if (! empty($input['phone'])) {
70
+			$args['EVT_phone'] = sanitize_text_field($input['phone']);
71
+		}
72
+
73
+		if (! empty($input['shortDescription'])) {
74
+			$args['EVT_short_desc'] = sanitize_post_field('post_excerpt', $input['shortDescription'], null, $context = 'db');
75
+		}
76
+
77
+		if (! empty($input['timezoneString'])) {
78
+			$args['EVT_timezone_string'] = sanitize_text_field($input['timezoneString']);
79
+		}
80
+
81
+		if (! empty($input['visibleOn'])) {
82
+			$args['EVT_visible_on'] = new DateTime(sanitize_text_field($input['visibleOn']));
83
+		}
84
+
85
+		if (! empty($input['wpUser'])) {
86
+			$args['EVT_wp_user'] = absint($input['wpUser']);
87
+		}
88
+
89
+		return apply_filters(
90
+			'FHEE__EventEspresso_core_domain_services_graphql_data_mutations__event_args',
91
+			$args,
92
+			$input
93
+		);
94
+	}
95 95
 }
Please login to merge, or discard this patch.
core/domain/services/graphql/types/Event.php 1 patch
Indentation   +200 added lines, -200 removed lines patch added patch discarded remove patch
@@ -21,209 +21,209 @@
 block discarded – undo
21 21
 class Event extends TypeBase
22 22
 {
23 23
 
24
-    /**
25
-     * Event constructor.
26
-     *
27
-     * @param EEM_Event $event_model
28
-     */
29
-    public function __construct(EEM_Event $event_model)
30
-    {
31
-        $this->model = $event_model;
32
-        $this->setName($this->namespace . 'Event');
33
-        $this->setIsCustomPostType(true);
34
-        parent::__construct();
35
-    }
24
+	/**
25
+	 * Event constructor.
26
+	 *
27
+	 * @param EEM_Event $event_model
28
+	 */
29
+	public function __construct(EEM_Event $event_model)
30
+	{
31
+		$this->model = $event_model;
32
+		$this->setName($this->namespace . 'Event');
33
+		$this->setIsCustomPostType(true);
34
+		parent::__construct();
35
+	}
36 36
 
37 37
 
38
-    /**
39
-     * @return GraphQLFieldInterface[]
40
-     * @since $VID:$
41
-     */
42
-    public function getFields()
43
-    {
44
-        $fields = [
45
-            new GraphQLOutputField(
46
-                'dbId',
47
-                ['non_null' => 'Int'],
48
-                'ID',
49
-                esc_html__('The event ID.', 'event_espresso')
50
-            ),
51
-            new GraphQLOutputField(
52
-                'cacheId',
53
-                ['non_null' => 'String'],
54
-                null,
55
-                esc_html__('The cache ID of the object.', 'event_espresso')
56
-            ),
57
-            new GraphQLField(
58
-                'name',
59
-                'String',
60
-                'name',
61
-                esc_html__('Event Name', 'event_espresso')
62
-            ),
63
-            new GraphQLField(
64
-                'description',
65
-                'String',
66
-                'description',
67
-                esc_html__('Event Description', 'event_espresso')
68
-            ),
69
-            new GraphQLField(
70
-                'shortDescription',
71
-                'String',
72
-                'short_description',
73
-                esc_html__('Event Short Description', 'event_espresso')
74
-            ),
75
-            new GraphQLField(
76
-                'created',
77
-                'String',
78
-                'created',
79
-                esc_html__('Date/Time Event Created', 'event_espresso')
80
-            ),
81
-            new GraphQLOutputField(
82
-                'wpUser',
83
-                'User',
84
-                null,
85
-                esc_html__('Event Creator', 'event_espresso')
86
-            ),
87
-            new GraphQLInputField(
88
-                'wpUser',
89
-                'Int',
90
-                null,
91
-                esc_html__('Event Creator ID', 'event_espresso')
92
-            ),
93
-            new GraphQLField(
94
-                'order',
95
-                'Int',
96
-                'order',
97
-                esc_html__('Event Menu Order', 'event_espresso')
98
-            ),
99
-            new GraphQLField(
100
-                'displayDescription',
101
-                'Boolean',
102
-                'display_description',
103
-                esc_html__('Display Description Flag', 'event_espresso')
104
-            ),
105
-            new GraphQLField(
106
-                'displayTicketSelector',
107
-                'Boolean',
108
-                'display_ticket_selector',
109
-                esc_html__('Display Ticket Selector Flag', 'event_espresso')
110
-            ),
111
-            new GraphQLField(
112
-                'visibleOn',
113
-                'String',
114
-                'visible_on',
115
-                esc_html__('Event Visible Date', 'event_espresso')
116
-            ),
117
-            new GraphQLField(
118
-                'additionalLimit',
119
-                'Int',
120
-                'additional_limit',
121
-                esc_html__('Limit of Additional Registrations on Same Transaction', 'event_espresso')
122
-            ),
123
-            new GraphQLField(
124
-                'phone',
125
-                'String',
126
-                'phone',
127
-                esc_html__('Event Phone Number', 'event_espresso')
128
-            ),
129
-            new GraphQLField(
130
-                'memberOnly',
131
-                'Boolean',
132
-                'member_only',
133
-                esc_html__('Member-Only Event Flag', 'event_espresso')
134
-            ),
135
-            new GraphQLField(
136
-                'allowOverflow',
137
-                'Boolean',
138
-                'allow_overflow',
139
-                esc_html__('Allow Overflow on Event', 'event_espresso')
140
-            ),
141
-            new GraphQLField(
142
-                'timezoneString',
143
-                'String',
144
-                'timezone_string',
145
-                esc_html__('Timezone (name) for Event times', 'event_espresso')
146
-            ),
147
-            new GraphQLField(
148
-                'externalUrl',
149
-                'String',
150
-                'external_url',
151
-                esc_html__('URL of Event Page if hosted elsewhere', 'event_espresso')
152
-            ),
153
-            new GraphQLField(
154
-                'donations',
155
-                'Boolean',
156
-                'donations',
157
-                esc_html__('Accept Donations?', 'event_espresso')
158
-            ),
159
-            new GraphQLField(
160
-                'isSoldOut',
161
-                'Boolean',
162
-                'is_sold_out',
163
-                esc_html__(
164
-                    'Flag indicating whether the tickets sold for the event, met or exceed the registration limit',
165
-                    'event_espresso'
166
-                )
167
-            ),
168
-            new GraphQLField(
169
-                'isPostponed',
170
-                'Boolean',
171
-                'is_postponed',
172
-                esc_html__('Flag indicating whether the event is marked as postponed', 'event_espresso')
173
-            ),
174
-            new GraphQLField(
175
-                'isCancelled',
176
-                'Boolean',
177
-                'is_cancelled',
178
-                esc_html__('Flag indicating whether the event is marked as cancelled', 'event_espresso')
179
-            ),
180
-            new GraphQLOutputField(
181
-                'isUpcoming',
182
-                'Boolean',
183
-                'is_upcoming',
184
-                esc_html__('Whether the event is upcoming', 'event_espresso')
185
-            ),
186
-            new GraphQLOutputField(
187
-                'isActive',
188
-                'Boolean',
189
-                'is_active',
190
-                esc_html__('Flag indicating event is active', 'event_espresso')
191
-            ),
192
-            new GraphQLOutputField(
193
-                'isInactive',
194
-                'Boolean',
195
-                'is_inactive',
196
-                esc_html__('Flag indicating event is inactive', 'event_espresso')
197
-            ),
198
-            new GraphQLOutputField(
199
-                'isExpired',
200
-                'Boolean',
201
-                'is_expired',
202
-                esc_html__('Flag indicating event is expired or not', 'event_espresso')
203
-            ),
204
-        ];
38
+	/**
39
+	 * @return GraphQLFieldInterface[]
40
+	 * @since $VID:$
41
+	 */
42
+	public function getFields()
43
+	{
44
+		$fields = [
45
+			new GraphQLOutputField(
46
+				'dbId',
47
+				['non_null' => 'Int'],
48
+				'ID',
49
+				esc_html__('The event ID.', 'event_espresso')
50
+			),
51
+			new GraphQLOutputField(
52
+				'cacheId',
53
+				['non_null' => 'String'],
54
+				null,
55
+				esc_html__('The cache ID of the object.', 'event_espresso')
56
+			),
57
+			new GraphQLField(
58
+				'name',
59
+				'String',
60
+				'name',
61
+				esc_html__('Event Name', 'event_espresso')
62
+			),
63
+			new GraphQLField(
64
+				'description',
65
+				'String',
66
+				'description',
67
+				esc_html__('Event Description', 'event_espresso')
68
+			),
69
+			new GraphQLField(
70
+				'shortDescription',
71
+				'String',
72
+				'short_description',
73
+				esc_html__('Event Short Description', 'event_espresso')
74
+			),
75
+			new GraphQLField(
76
+				'created',
77
+				'String',
78
+				'created',
79
+				esc_html__('Date/Time Event Created', 'event_espresso')
80
+			),
81
+			new GraphQLOutputField(
82
+				'wpUser',
83
+				'User',
84
+				null,
85
+				esc_html__('Event Creator', 'event_espresso')
86
+			),
87
+			new GraphQLInputField(
88
+				'wpUser',
89
+				'Int',
90
+				null,
91
+				esc_html__('Event Creator ID', 'event_espresso')
92
+			),
93
+			new GraphQLField(
94
+				'order',
95
+				'Int',
96
+				'order',
97
+				esc_html__('Event Menu Order', 'event_espresso')
98
+			),
99
+			new GraphQLField(
100
+				'displayDescription',
101
+				'Boolean',
102
+				'display_description',
103
+				esc_html__('Display Description Flag', 'event_espresso')
104
+			),
105
+			new GraphQLField(
106
+				'displayTicketSelector',
107
+				'Boolean',
108
+				'display_ticket_selector',
109
+				esc_html__('Display Ticket Selector Flag', 'event_espresso')
110
+			),
111
+			new GraphQLField(
112
+				'visibleOn',
113
+				'String',
114
+				'visible_on',
115
+				esc_html__('Event Visible Date', 'event_espresso')
116
+			),
117
+			new GraphQLField(
118
+				'additionalLimit',
119
+				'Int',
120
+				'additional_limit',
121
+				esc_html__('Limit of Additional Registrations on Same Transaction', 'event_espresso')
122
+			),
123
+			new GraphQLField(
124
+				'phone',
125
+				'String',
126
+				'phone',
127
+				esc_html__('Event Phone Number', 'event_espresso')
128
+			),
129
+			new GraphQLField(
130
+				'memberOnly',
131
+				'Boolean',
132
+				'member_only',
133
+				esc_html__('Member-Only Event Flag', 'event_espresso')
134
+			),
135
+			new GraphQLField(
136
+				'allowOverflow',
137
+				'Boolean',
138
+				'allow_overflow',
139
+				esc_html__('Allow Overflow on Event', 'event_espresso')
140
+			),
141
+			new GraphQLField(
142
+				'timezoneString',
143
+				'String',
144
+				'timezone_string',
145
+				esc_html__('Timezone (name) for Event times', 'event_espresso')
146
+			),
147
+			new GraphQLField(
148
+				'externalUrl',
149
+				'String',
150
+				'external_url',
151
+				esc_html__('URL of Event Page if hosted elsewhere', 'event_espresso')
152
+			),
153
+			new GraphQLField(
154
+				'donations',
155
+				'Boolean',
156
+				'donations',
157
+				esc_html__('Accept Donations?', 'event_espresso')
158
+			),
159
+			new GraphQLField(
160
+				'isSoldOut',
161
+				'Boolean',
162
+				'is_sold_out',
163
+				esc_html__(
164
+					'Flag indicating whether the tickets sold for the event, met or exceed the registration limit',
165
+					'event_espresso'
166
+				)
167
+			),
168
+			new GraphQLField(
169
+				'isPostponed',
170
+				'Boolean',
171
+				'is_postponed',
172
+				esc_html__('Flag indicating whether the event is marked as postponed', 'event_espresso')
173
+			),
174
+			new GraphQLField(
175
+				'isCancelled',
176
+				'Boolean',
177
+				'is_cancelled',
178
+				esc_html__('Flag indicating whether the event is marked as cancelled', 'event_espresso')
179
+			),
180
+			new GraphQLOutputField(
181
+				'isUpcoming',
182
+				'Boolean',
183
+				'is_upcoming',
184
+				esc_html__('Whether the event is upcoming', 'event_espresso')
185
+			),
186
+			new GraphQLOutputField(
187
+				'isActive',
188
+				'Boolean',
189
+				'is_active',
190
+				esc_html__('Flag indicating event is active', 'event_espresso')
191
+			),
192
+			new GraphQLOutputField(
193
+				'isInactive',
194
+				'Boolean',
195
+				'is_inactive',
196
+				esc_html__('Flag indicating event is inactive', 'event_espresso')
197
+			),
198
+			new GraphQLOutputField(
199
+				'isExpired',
200
+				'Boolean',
201
+				'is_expired',
202
+				esc_html__('Flag indicating event is expired or not', 'event_espresso')
203
+			),
204
+		];
205 205
 
206
-        return apply_filters(
207
-            'FHEE__EventEspresso_core_domain_services_graphql_types__event_fields',
208
-            $fields,
209
-            $this->name,
210
-            $this->model
211
-        );
212
-    }
206
+		return apply_filters(
207
+			'FHEE__EventEspresso_core_domain_services_graphql_types__event_fields',
208
+			$fields,
209
+			$this->name,
210
+			$this->model
211
+		);
212
+	}
213 213
 
214 214
 
215
-    /**
216
-     * Extends the existing WP GraphQL mutations.
217
-     *
218
-     * @since $VID:$
219
-     */
220
-    public function extendMutations()
221
-    {
222
-        add_action(
223
-            'graphql_post_object_mutation_update_additional_data',
224
-            EventUpdate::mutateFields($this->model, $this),
225
-            10,
226
-            6
227
-        );
228
-    }
215
+	/**
216
+	 * Extends the existing WP GraphQL mutations.
217
+	 *
218
+	 * @since $VID:$
219
+	 */
220
+	public function extendMutations()
221
+	{
222
+		add_action(
223
+			'graphql_post_object_mutation_update_additional_data',
224
+			EventUpdate::mutateFields($this->model, $this),
225
+			10,
226
+			6
227
+		);
228
+	}
229 229
 }
Please login to merge, or discard this patch.