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 / spain.php

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

97 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) 2022 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 Spain.
16 *
17 * @since 1.15.2 (J) - 1.5.5 (WP)
18 */
19 final class VBOCheckinPaxfieldsSpain extends VBOCheckinAdapter
20 {
21 /**
22 * The ID of this pax data collector class.
23 *
24 * @var string
25 */
26 protected $collector_id = 'spain';
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 '"España"';
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 'gender' => JText::translate('VBOCUSTGENDER'),
50 'date_birth' => JText::translate('ORDER_DBIRTH'),
51 'country' => JText::translate('VBCUSTOMERCOUNTRY'),
52 'doctype' => JText::translate('VBCUSTOMERDOCTYPE'),
53 'docnum' => JText::translate('VBCUSTOMERDOCNUM'),
54 'docissuedt' => JText::translate('VBCUSTOMERDOCISSUE'),
55 'extranotes' => JText::translate('VBOGUESTEXTRANOTES'),
56 ];
57 }
58
59 /**
60 * Returns the list of field attributes. The count and keys
61 * of the attributes should match with the labels.
62 *
63 * @return array associative list of field attributes.
64 */
65 public function getAttributes()
66 {
67 return [
68 'first_name' => 'text',
69 'last_name' => 'text',
70 'gender' => 'spain_gender',
71 'date_birth' => 'calendar',
72 'country' => 'country',
73 'doctype' => 'spain_doctype',
74 'docnum' => 'text',
75 'docissuedt' => 'calendar',
76 'extranotes' => 'textarea',
77 ];
78 }
79
80 /**
81 * Returns the associative list of ID types for Spain.
82 *
83 * @return array associative list of doc types.
84 */
85 public function loadDocumenti()
86 {
87 return [
88 "D" => "Documento Nacional de Identidad",
89 "P" => "Pasaporte",
90 "C" => "Permiso de Conducir",
91 "I" => "Carta o Documento de Identidad",
92 "N" => "Permiso de Residencia Español",
93 "X" => "Permiso de Residencia de otro Estado Miembro de la Unión Europea",
94 ];
95 }
96 }
97