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 / new-event-email.php

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

94 lines 1.7 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 New_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 customer object
32 *
33 * @var Object
34 */
35 public $customer;
36
37 /**
38 * Store meeting object
39 *
40 * @var Object
41 */
42 public $meeting;
43
44 /**
45 * New Event Email Constructor
46 *
47 * @return void
48 */
49 public function __construct( Booking $booking ) {
50 $this->booking = $booking;
51 $this->meeting = new Appointment( $booking->get_appointment() );
52 $this->staff = new Staff( $booking->get_staff_id() );
53 $this->customer = new Customer( $booking->get_customer_id() );
54
55 parent::__construct();
56 }
57
58 /**
59 * Get email recipient
60 *
61 * @return string
62 */
63 public function get_recipient() {
64 return $this->staff->get_email();
65 }
66
67 /**
68 * Get new event email
69 *
70 * @return string
71 */
72 public function get_subject() {
73 return $this->meeting->get_name();
74 }
75
76 /**
77 * Get email title
78 *
79 * @return string
80 */
81 public function get_title() {
82 return $this->meeting->get_name();
83 }
84
85 /**
86 * Get template new event email
87 *
88 * @return string
89 */
90 public function get_template() {
91 return TIMETICS_PLUGIN_DIR . '/templates/emails/new-event.php';
92 }
93 }
94