PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.8.15
VikBooking Hotel Booking Engine & PMS v1.8.15
1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 1.7.3 All 36 releases
vikbooking / admin / helpers / src / checkin / paxfields / portugal.php

portugal.php in VikBooking Hotel Booking Engine & PMS 1.8.15, at admin/helpers/src/checkin/paxfields/portugal.php

98 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package VikBooking
4 * @subpackage core
5 * @author Alessio Gaggii - E4J s.r.l.
6 * @copyright Copyright (C) 2023 E4J s.r.l. All Rights Reserved.
7 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
8 * @link https://vikwp.com
9 */
10
11 // No direct access
12 defined('ABSPATH') or die('No script kiddies please!');
13
14 /**
15 * Helper class to support custom pax fields data collection types for Portugal.
16 *
17 * @since 1.16.2 (J) - 1.6.2 (WP)
18 */
19 final class VBOCheckinPaxfieldsPortugal extends VBOCheckinAdapter
20 {
21 /**
22 * The ID of this pax data collector class.
23 *
24 * @var string
25 */
26 protected $collector_id = 'portugal';
27
28 /**
29 * Returns the name of the current pax data driver.
30 *
31 * @return string the name of this driver.
32 */
33 public function getName()
34 {
35 return '"Portugal"';
36 }
37
38 /**
39 * Returns the list of field labels. The count and keys
40 * of the labels should match with the attributes.
41 *
42 * @return array associative list of field labels.
43 */
44 public function getLabels()
45 {
46 return [
47 'first_name' => JText::translate('VBCUSTOMERFIRSTNAME'),
48 'last_name' => JText::translate('VBCUSTOMERLASTNAME'),
49 'country_c' => JText::translate('VBCUSTOMERCOUNTRY'),
50 'place_birth' => JText::translate('VBOCUSTPLACEBIRTH'),
51 'date_birth' => JText::translate('ORDER_DBIRTH'),
52 'docnum' => JText::translate('VBCUSTOMERDOCNUM'),
53 'doctype' => JText::translate('VBCUSTOMERDOCTYPE'),
54 'docplace' => 'Issuing Country (País Emissor)',
55 'country_s' => 'Country of Residence (País Residência)',
56 'place_s' => 'Place of Residence (Local Residência)',
57 'extranotes' => JText::translate('VBOGUESTEXTRANOTES'),
58 ];
59 }
60
61 /**
62 * Returns the list of field attributes. The count and keys
63 * of the attributes should match with the labels.
64 *
65 * @return array associative list of field attributes.
66 */
67 public function getAttributes()
68 {
69 return [
70 'first_name' => 'text',
71 'last_name' => 'text',
72 'country_c' => 'country',
73 'place_birth' => 'text',
74 'date_birth' => 'calendar',
75 'docnum' => 'text',
76 'doctype' => 'portugal_doctype',
77 'docplace' => 'country',
78 'country_s' => 'country',
79 'place_s' => 'text',
80 'extranotes' => 'textarea',
81 ];
82 }
83
84 /**
85 * Returns the associative list of ID types for Portugal.
86 *
87 * @return array associative list of doc types.
88 */
89 public function loadIdTypes()
90 {
91 return [
92 "B" => "Identity card (Bilhete de Identidade)",
93 "P" => "Passport (Passaporte)",
94 "O" => "Other (Outro documento de identificação)",
95 ];
96 }
97 }
98