PluginProbe ʕ •ᴥ•ʔ
LatePoint – Calendar Booking Plugin for Appointments and Events / 5.1.9
LatePoint – Calendar Booking Plugin for Appointments and Events v5.1.9
5.6.6 5.6.5 5.6.4 5.6.3 5.6.2 5.6.1 5.6.0 5.5.2 5.5.1 5.5.0 5.4.2 trunk 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.1.91 5.1.92 5.1.93 5.1.94 5.2.0 5.2.1 5.2.10 5.2.11 5.2.2 5.2.3 5.2.4 5.2.5 5.2.6 5.2.7 5.2.8 5.2.9 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1
latepoint / blocks / elementor / elementor_widget_customer_dashboard.php
latepoint / blocks / elementor Last commit date
elementor_widget_book_button.php 1 year ago elementor_widget_book_form.php 1 year ago elementor_widget_calendar.php 1 year ago elementor_widget_customer_dashboard.php 1 year ago elementor_widget_customer_login.php 1 year ago elementor_widget_list_of_resources.php 1 year ago
elementor_widget_customer_dashboard.php
86 lines
1 <?php
2
3 class Latepoint_Elementor_Widget_Customer_Dashboard extends \Elementor\Widget_Base {
4
5 protected $widget_data;
6 /**
7 * Widget base constructor
8 */
9 public function __construct( $data = [], $args = null ) {
10 $this->widget_data = $args;
11 parent::__construct( $data, $args );
12 }
13
14
15 /**
16 * Get widget name
17 */
18 public function get_name(): string {
19 return 'latepoint_customer_dashboard';
20 }
21
22 /**
23 * Get widget title
24 */
25 public function get_title(): string {
26 return esc_html__( 'Customer Dashboard', 'latepoint' );
27 }
28
29 /**
30 * Get widget icon
31 */
32 public function get_icon(): string {
33 return 'eicon-archive';
34 }
35
36 /**
37 * Get widget categories
38 */
39 public function get_categories(): array {
40 return [ OsElementorHelper::$category ];
41 }
42
43 /**
44 * Register widget controls
45 */
46 protected function register_controls(): void {
47
48 # Booking Form Settings Section
49 $this->start_controls_section(
50 'content_section_booking_form_settings',
51 [
52 'label' => esc_html__( 'Content', 'latepoint' ),
53 'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
54 ]
55 );
56
57 $this->add_control(
58 'hide_new_appointment_ui',
59 [
60 'label' => esc_html__( 'Hide New Appointment UI', 'latepoint' ),
61 'type' => \Elementor\Controls_Manager::SWITCHER,
62 'label_on' => esc_html__( 'Yes', 'latepoint' ),
63 'label_off' => esc_html__( 'No', 'latepoint' ),
64 'return_value' => 'yes',
65 'default' => 'no',
66 ]
67 );
68
69 $this->end_controls_section();
70 }
71
72 /**
73 * Render widget output on the frontend
74 */
75 protected function render(): void {
76 $settings = $this->get_settings_for_display();
77
78 $allowed_params = [
79 'hide_new_appointment_ui'
80 ];
81
82 $params = OsBlockHelper::attributes_to_data_params($settings, $allowed_params);
83 echo do_shortcode('[latepoint_customer_dashboard ' . $params . ']');
84 }
85
86 }