@@ 49-52 (lines=4) @@ | ||
46 | ||
47 | if (! empty($input['eventId'])) { |
|
48 | $args['EVT_ID'] = absint($input['eventId']); |
|
49 | } elseif (! empty($input['event'])) { |
|
50 | $parts = Relay::fromGlobalId(sanitize_text_field($input['event'])); |
|
51 | $args['EVT_ID'] = (! empty($parts['id']) && is_int($parts['id'])) ? $parts['id'] : null; |
|
52 | } |
|
53 | ||
54 | if (array_key_exists('isPrimary', $input)) { |
|
55 | $args['DTT_is_primary'] = (bool) $input['isPrimary']; |
|
@@ 70-73 (lines=4) @@ | ||
67 | $args['DTT_order'] = (int) $input['order']; |
|
68 | } |
|
69 | ||
70 | if (! empty($input['parent'])) { |
|
71 | $parts = Relay::fromGlobalId(sanitize_text_field($input['parent'])); |
|
72 | $args['DTT_parent'] = (! empty($parts['id']) && is_int($parts['id'])) ? $parts['id'] : null; |
|
73 | } |
|
74 | ||
75 | if (array_key_exists('reserved', $input)) { |
|
76 | $args['DTT_reserved'] = (int) $input['reserved']; |
@@ 52-55 (lines=4) @@ | ||
49 | $args['FSC_status'] = sanitize_text_field($input['status']); |
|
50 | } |
|
51 | ||
52 | if (! empty($input['wpUser'])) { |
|
53 | $parts = Relay::fromGlobalId(sanitize_text_field($input['wpUser'])); |
|
54 | $args['FSC_wpUser'] = (! empty($parts['id']) && is_int($parts['id'])) ? $parts['id'] : null; |
|
55 | } |
|
56 | ||
57 | return apply_filters( |
|
58 | 'FHEE__EventEspresso_core_domain_services_graphql_data_mutations__form_section_args', |
@@ 55-58 (lines=4) @@ | ||
52 | $args['PRC_overrides'] = (int) $input['overrides']; |
|
53 | } |
|
54 | ||
55 | if (! empty($input['parent'])) { |
|
56 | $parts = Relay::fromGlobalId(sanitize_text_field($input['parent'])); |
|
57 | $args['PRC_parent'] = ! empty($parts['id']) ? absint($parts['id']) : 0; |
|
58 | } |
|
59 | ||
60 | if (! empty($input['priceType'])) { |
|
61 | $parts = Relay::fromGlobalId(sanitize_text_field($input['priceType'])); |
|
@@ 60-63 (lines=4) @@ | ||
57 | $args['PRC_parent'] = ! empty($parts['id']) ? absint($parts['id']) : 0; |
|
58 | } |
|
59 | ||
60 | if (! empty($input['priceType'])) { |
|
61 | $parts = Relay::fromGlobalId(sanitize_text_field($input['priceType'])); |
|
62 | $args['PRT_ID'] = ! empty($parts['id']) ? absint($parts['id']) : 0; |
|
63 | } |
|
64 | ||
65 | if (! empty($input['wpUser'])) { |
|
66 | $parts = Relay::fromGlobalId(sanitize_text_field($input['wpUser'])); |
|
@@ 65-68 (lines=4) @@ | ||
62 | $args['PRT_ID'] = ! empty($parts['id']) ? absint($parts['id']) : 0; |
|
63 | } |
|
64 | ||
65 | if (! empty($input['wpUser'])) { |
|
66 | $parts = Relay::fromGlobalId(sanitize_text_field($input['wpUser'])); |
|
67 | $args['PRC_wp_user'] = (! empty($parts['id']) && is_int($parts['id'])) ? $parts['id'] : null; |
|
68 | } |
|
69 | ||
70 | return apply_filters( |
|
71 | 'FHEE__EventEspresso_core_domain_services_graphql_data_mutations__price_args', |
@@ 81-84 (lines=4) @@ | ||
78 | $args['TKT_order'] = (int) $input['order']; |
|
79 | } |
|
80 | ||
81 | if (! empty($input['parent'])) { |
|
82 | $parts = Relay::fromGlobalId(sanitize_text_field($input['parent'])); |
|
83 | $args['TKT_parent'] = (! empty($parts['id']) && is_int($parts['id'])) ? $parts['id'] : null; |
|
84 | } |
|
85 | ||
86 | // price can be 0 |
|
87 | if (array_key_exists('price', $input)) { |
|
@@ 124-127 (lines=4) @@ | ||
121 | $args['TKT_uses'] = (int) $input['uses']; |
|
122 | } |
|
123 | ||
124 | if (! empty($input['wpUser'])) { |
|
125 | $parts = Relay::fromGlobalId(sanitize_text_field($input['wpUser'])); |
|
126 | $args['TKT_wp_user'] = (! empty($parts['id']) && is_int($parts['id'])) ? $parts['id'] : null; |
|
127 | } |
|
128 | ||
129 | if (array_key_exists('visibility', $input)) { |
|
130 | $args['TKT_visibility'] = (int) $input['visibility']; |