# timetics/1.0.22/core/emails/update-event-email.php

Timetics – Appointment Booking Calendar &amp; Scheduling, version 1.0.22. 103 lines.

- Page: https://pluginprobe.com/plugins/timetics/1.0.22/code/core/emails/update-event-email.php
- Raw: https://pluginprobe.com/plugins/timetics/1.0.22/raw/core/emails/update-event-email.php
- Modified: 2024-06-12T04:00:44+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/timetics/1.0.22/code/core/emails/update-event-email.php#L10-L20`.

```php
<?php
/**
 * New event email class
 *
 * @package Timetics
 */
namespace Timetics\Core\Emails;

use Timetics\Core\Appointments\Appointment;
use Timetics\Core\Bookings\Booking;
use Timetics\Core\Customers\Customer;
use Timetics\Core\Staffs\Staff;

class Update_Event_Email extends Email {

    /**
     * Store booking object
     *
     * @var Object
     */
    public $booking;

    /**
     * Store staff object
     *
     * @var Object
     */
    public $staff;    
    
    /**
     * Store event object
     *
     * @var Object
     */
    public $event;

    /**
     * Store customer object
     *
     * @var Object
     */
    public $customer;

    /**
     * Store meeting object
     *
     * @var Object
     */
    public $meeting;

    /**
     * New Event Email Constructor
     *
     * @return void
     */
    public function __construct( Booking $booking ) {
        $this->booking  = $booking;
        $this->meeting  = new Appointment( $booking->get_appointment() );
        $this->staff    = new Staff( $booking->get_staff_id() );
        $this->customer = new Customer( $booking->get_customer_id() );

        apply_filters( 'timeics/booking/update', $booking, $this );

        parent::__construct();
    }

    /**
     * Get email recipient
     *
     * @return string
     */
    public function get_recipient() {
        return $this->staff->get_email();
    }

    /**
     * Get new event email
     *
     * @return string
     */
    public function get_subject() {
        return $this->meeting->get_name();
    }

    /**
     * Get email title
     *
     * @return string
     */
    public function get_title() {
        return $this->meeting->get_name();
    }

    /**
     * Get template new event email
     *
     * @return  string
     */
    public function get_template() {
        return TIMETICS_PLUGIN_DIR . '/templates/emails/update-event.php';
    }
}

```
