@@ -18,99 +18,99 @@ |
||
| 18 | 18 | class Country extends TypeBase |
| 19 | 19 | { |
| 20 | 20 | |
| 21 | - /** |
|
| 22 | - * Country constructor. |
|
| 23 | - * |
|
| 24 | - * @param EEM_Country $country_model |
|
| 25 | - */ |
|
| 26 | - public function __construct(EEM_Country $country_model) |
|
| 27 | - { |
|
| 28 | - $this->model = $country_model; |
|
| 29 | - $this->setName('Country'); |
|
| 30 | - $this->setDescription(__('A country', 'event_espresso')); |
|
| 31 | - $this->setIsCustomPostType(false); |
|
| 32 | - parent::__construct(); |
|
| 33 | - } |
|
| 21 | + /** |
|
| 22 | + * Country constructor. |
|
| 23 | + * |
|
| 24 | + * @param EEM_Country $country_model |
|
| 25 | + */ |
|
| 26 | + public function __construct(EEM_Country $country_model) |
|
| 27 | + { |
|
| 28 | + $this->model = $country_model; |
|
| 29 | + $this->setName('Country'); |
|
| 30 | + $this->setDescription(__('A country', 'event_espresso')); |
|
| 31 | + $this->setIsCustomPostType(false); |
|
| 32 | + parent::__construct(); |
|
| 33 | + } |
|
| 34 | 34 | |
| 35 | 35 | |
| 36 | - /** |
|
| 37 | - * @return \EventEspresso\core\services\graphql\fields\GraphQLFieldInterface[] |
|
| 38 | - * @since $VID:$ |
|
| 39 | - */ |
|
| 40 | - public function getFields() |
|
| 41 | - { |
|
| 42 | - return [ |
|
| 43 | - new GraphQLField( |
|
| 44 | - 'isActive', |
|
| 45 | - 'Boolean', |
|
| 46 | - null, // 'active', |
|
| 47 | - __('Flag that indicates if the country should appear in dropdown select lists', 'event_espresso') |
|
| 48 | - ), |
|
| 49 | - new GraphQLField( |
|
| 50 | - 'ISO', |
|
| 51 | - 'String', |
|
| 52 | - null, //'ISO', |
|
| 53 | - __('Country ISO Code', 'event_espresso') |
|
| 54 | - ), |
|
| 55 | - new GraphQLField( |
|
| 56 | - 'ISO3', |
|
| 57 | - 'String', |
|
| 58 | - null, //'ISO3', |
|
| 59 | - __('Country ISO3 Code', 'event_espresso') |
|
| 60 | - ), |
|
| 61 | - new GraphQLField( |
|
| 62 | - 'name', |
|
| 63 | - 'String', |
|
| 64 | - 'name', |
|
| 65 | - __('Country Name', 'event_espresso') |
|
| 66 | - ), |
|
| 67 | - new GraphQLField( |
|
| 68 | - 'currencyCode', |
|
| 69 | - 'String', |
|
| 70 | - 'currency_code', |
|
| 71 | - __('Country Currency Code', 'event_espresso') |
|
| 72 | - ), |
|
| 73 | - new GraphQLField( |
|
| 74 | - 'currencySingular', |
|
| 75 | - 'String', |
|
| 76 | - 'currency_name_single', |
|
| 77 | - __('Currency Name Singular', 'event_espresso') |
|
| 78 | - ), |
|
| 79 | - new GraphQLField( |
|
| 80 | - 'currencyPlural', |
|
| 81 | - 'String', |
|
| 82 | - 'currency_name_plural', |
|
| 83 | - __('Currency Name Plural', 'event_espresso') |
|
| 84 | - ), |
|
| 85 | - new GraphQLField( |
|
| 86 | - 'currencySign', |
|
| 87 | - 'String', |
|
| 88 | - 'currency_sign',__('Currency Sign', 'event_espresso') |
|
| 89 | - ), |
|
| 90 | - new GraphQLField( |
|
| 91 | - 'currencySignBeforeNumber', |
|
| 92 | - 'String', |
|
| 93 | - 'currency_sign_before', |
|
| 94 | - __('Currency Sign Before Number', 'event_espresso') |
|
| 95 | - ), |
|
| 96 | - new GraphQLField( |
|
| 97 | - 'currencyDecimalPlaces', |
|
| 98 | - 'String', |
|
| 99 | - 'currency_decimal_places', |
|
| 100 | - __('Currency Decimal Places', 'event_espresso') |
|
| 101 | - ), |
|
| 102 | - new GraphQLField( |
|
| 103 | - 'currencyDecimalMark', |
|
| 104 | - 'String', |
|
| 105 | - 'currency_decimal_mark', |
|
| 106 | - __('Currency Decimal Mark', 'event_espresso') |
|
| 107 | - ), |
|
| 108 | - new GraphQLField( |
|
| 109 | - 'currencyThousandsSeparator', |
|
| 110 | - 'String', |
|
| 111 | - 'currency_thousands_separator', |
|
| 112 | - __('Currency Thousands Separator', 'event_espresso') |
|
| 113 | - ), |
|
| 114 | - ]; |
|
| 115 | - } |
|
| 36 | + /** |
|
| 37 | + * @return \EventEspresso\core\services\graphql\fields\GraphQLFieldInterface[] |
|
| 38 | + * @since $VID:$ |
|
| 39 | + */ |
|
| 40 | + public function getFields() |
|
| 41 | + { |
|
| 42 | + return [ |
|
| 43 | + new GraphQLField( |
|
| 44 | + 'isActive', |
|
| 45 | + 'Boolean', |
|
| 46 | + null, // 'active', |
|
| 47 | + __('Flag that indicates if the country should appear in dropdown select lists', 'event_espresso') |
|
| 48 | + ), |
|
| 49 | + new GraphQLField( |
|
| 50 | + 'ISO', |
|
| 51 | + 'String', |
|
| 52 | + null, //'ISO', |
|
| 53 | + __('Country ISO Code', 'event_espresso') |
|
| 54 | + ), |
|
| 55 | + new GraphQLField( |
|
| 56 | + 'ISO3', |
|
| 57 | + 'String', |
|
| 58 | + null, //'ISO3', |
|
| 59 | + __('Country ISO3 Code', 'event_espresso') |
|
| 60 | + ), |
|
| 61 | + new GraphQLField( |
|
| 62 | + 'name', |
|
| 63 | + 'String', |
|
| 64 | + 'name', |
|
| 65 | + __('Country Name', 'event_espresso') |
|
| 66 | + ), |
|
| 67 | + new GraphQLField( |
|
| 68 | + 'currencyCode', |
|
| 69 | + 'String', |
|
| 70 | + 'currency_code', |
|
| 71 | + __('Country Currency Code', 'event_espresso') |
|
| 72 | + ), |
|
| 73 | + new GraphQLField( |
|
| 74 | + 'currencySingular', |
|
| 75 | + 'String', |
|
| 76 | + 'currency_name_single', |
|
| 77 | + __('Currency Name Singular', 'event_espresso') |
|
| 78 | + ), |
|
| 79 | + new GraphQLField( |
|
| 80 | + 'currencyPlural', |
|
| 81 | + 'String', |
|
| 82 | + 'currency_name_plural', |
|
| 83 | + __('Currency Name Plural', 'event_espresso') |
|
| 84 | + ), |
|
| 85 | + new GraphQLField( |
|
| 86 | + 'currencySign', |
|
| 87 | + 'String', |
|
| 88 | + 'currency_sign',__('Currency Sign', 'event_espresso') |
|
| 89 | + ), |
|
| 90 | + new GraphQLField( |
|
| 91 | + 'currencySignBeforeNumber', |
|
| 92 | + 'String', |
|
| 93 | + 'currency_sign_before', |
|
| 94 | + __('Currency Sign Before Number', 'event_espresso') |
|
| 95 | + ), |
|
| 96 | + new GraphQLField( |
|
| 97 | + 'currencyDecimalPlaces', |
|
| 98 | + 'String', |
|
| 99 | + 'currency_decimal_places', |
|
| 100 | + __('Currency Decimal Places', 'event_espresso') |
|
| 101 | + ), |
|
| 102 | + new GraphQLField( |
|
| 103 | + 'currencyDecimalMark', |
|
| 104 | + 'String', |
|
| 105 | + 'currency_decimal_mark', |
|
| 106 | + __('Currency Decimal Mark', 'event_espresso') |
|
| 107 | + ), |
|
| 108 | + new GraphQLField( |
|
| 109 | + 'currencyThousandsSeparator', |
|
| 110 | + 'String', |
|
| 111 | + 'currency_thousands_separator', |
|
| 112 | + __('Currency Thousands Separator', 'event_espresso') |
|
| 113 | + ), |
|
| 114 | + ]; |
|
| 115 | + } |
|
| 116 | 116 | } |
| 117 | 117 | \ No newline at end of file |
@@ -23,16 +23,16 @@ |
||
| 23 | 23 | |
| 24 | 24 | $args = []; |
| 25 | 25 | |
| 26 | - if ( ! empty( $input['event'] ) ) { |
|
| 27 | - $args['EVT_ID'] = absint( $input['event'] ); |
|
| 26 | + if ( ! empty($input['event'])) { |
|
| 27 | + $args['EVT_ID'] = absint($input['event']); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - if ( ! empty( $input['name'] ) ) { |
|
| 31 | - $args['DTT_name'] = sanitize_text_field( $input['name'] ); |
|
| 30 | + if ( ! empty($input['name'])) { |
|
| 31 | + $args['DTT_name'] = sanitize_text_field($input['name']); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | - if ( ! empty( $input['description'] ) ) { |
|
| 35 | - $args['DTT_description'] = sanitize_text_field( $input['description'] ); |
|
| 34 | + if ( ! empty($input['description'])) { |
|
| 35 | + $args['DTT_description'] = sanitize_text_field($input['description']); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | // Likewise the other fields... |
@@ -23,16 +23,16 @@ |
||
| 23 | 23 | |
| 24 | 24 | $args = []; |
| 25 | 25 | |
| 26 | - if ( ! empty( $input['name'] ) ) { |
|
| 27 | - $args['VNU_name'] = sanitize_text_field( $input['name'] ); |
|
| 26 | + if ( ! empty($input['name'])) { |
|
| 27 | + $args['VNU_name'] = sanitize_text_field($input['name']); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - if ( ! empty( $input['desc'] ) ) { |
|
| 31 | - $args['VNU_desc'] = sanitize_text_field( $input['desc'] ); |
|
| 30 | + if ( ! empty($input['desc'])) { |
|
| 31 | + $args['VNU_desc'] = sanitize_text_field($input['desc']); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | - if ( ! empty( $input['shortDesc'] ) ) { |
|
| 35 | - $args['VNU_short_desc'] = sanitize_text_field( $input['shortDesc'] ); |
|
| 34 | + if ( ! empty($input['shortDesc'])) { |
|
| 35 | + $args['VNU_short_desc'] = sanitize_text_field($input['shortDesc']); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | // Likewise the other fields... |