PluginProbe
Timetics – Appointment Booking Calendar & Scheduling / 1.0.21
Timetics – Appointment Booking Calendar & Scheduling v1.0.21
1.0.61 1.0.60 1.0.59 1.0.58 1.0.57 1.0.56 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 1.0.22 1.0.23 1.0.24 All 62 releases
timetics / core / emails / update-event-email.php

update-event-email.php in Timetics – Appointment Booking Calendar & Scheduling 1.0.21, at core/emails/update-event-email.php

103 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * New event email class
4 *
5 * @package Timetics
6 */
7 namespace Timetics\Core\Emails;
8
9 use Timetics\Core\Appointments\Appointment;
10 use Timetics\Core\Bookings\Booking;
11 use Timetics\Core\Customers\Customer;
12 use Timetics\Core\Staffs\Staff;
13
14 class Update_Event_Email extends Email {
15
16 /**
17 * Store booking object
18 *
19 * @var Object
20 */
21 public $booking;
22
23 /**
24 * Store staff object
25 *
26 * @var Object
27 */
28 public $staff;
29
30 /**
31 * Store event object
32 *
33 * @var Object
34 */
35 public $event;
36
37 /**
38 * Store customer object
39 *
40 * @var Object
41 */
42 public $customer;
43
44 /**
45 * Store meeting object
46 *
47 * @var Object
48 */
49 public $meeting;
50
51 /**
52 * New Event Email Constructor
53 *
54 * @return void
55 */
56 public function __construct( Booking $booking ) {
57 $this->booking = $booking;
58 $this->meeting = new Appointment( $booking->get_appointment() );
59 $this->staff = new Staff( $booking->get_staff_id() );
60 $this->customer = new Customer( $booking->get_customer_id() );
61
62 apply_filters( 'timeics/booking/update', $booking, $this );
63
64 parent::__construct();
65 }
66
67 /**
68 * Get email recipient
69 *
70 * @return string
71 */
72 public function get_recipient() {
73 return $this->staff->get_email();
74 }
75
76 /**
77 * Get new event email
78 *
79 * @return string
80 */
81 public function get_subject() {
82 return $this->meeting->get_name();
83 }
84
85 /**
86 * Get email title
87 *
88 * @return string
89 */
90 public function get_title() {
91 return $this->meeting->get_name();
92 }
93
94 /**
95 * Get template new event email
96 *
97 * @return string
98 */
99 public function get_template() {
100 return TIMETICS_PLUGIN_DIR . '/templates/emails/update-event.php';
101 }
102 }
103