PluginProbe ʕ •ᴥ•ʔ
LatePoint – Calendar Booking Plugin for Appointments and Events / 5.5.2
LatePoint – Calendar Booking Plugin for Appointments and Events v5.5.2
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 / lib / controllers / notifications_controller.php
latepoint / lib / controllers Last commit date
activities_controller.php 1 month ago auth_controller.php 3 months ago booking_form_settings_controller.php 3 months ago bookings_controller.php 2 months ago calendars_controller.php 3 months ago carts_controller.php 3 months ago controller.php 3 months ago customer_cabinet_controller.php 2 months ago customers_controller.php 3 months ago dashboard_controller.php 2 months ago default_agent_controller.php 3 months ago events_controller.php 3 months ago form_fields_controller.php 3 months ago integrations_controller.php 3 months ago invoices_controller.php 2 months ago manage_booking_by_key_controller.php 3 months ago manage_order_by_key_controller.php 3 months ago notifications_controller.php 3 months ago orders_controller.php 3 months ago pro_controller.php 2 months ago process_jobs_controller.php 3 months ago processes_controller.php 3 months ago search_controller.php 3 months ago services_controller.php 3 months ago settings_controller.php 2 months ago steps_controller.php 3 months ago stripe_connect_controller.php 2 months ago support_topics_controller.php 3 months ago todos_controller.php 3 months ago transactions_controller.php 3 months ago wizard_controller.php 2 months ago
notifications_controller.php
54 lines
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit; // Exit if accessed directly.
4 }
5
6
7 if ( ! class_exists( 'OsNotificationsController' ) ) :
8
9
10 class OsNotificationsController extends OsController {
11
12 function __construct() {
13 parent::__construct();
14
15 $this->views_folder = LATEPOINT_VIEWS_ABSPATH . 'notifications/';
16 $this->vars['page_header'] = OsMenuHelper::get_menu_items_by_id( 'notifications' );
17 $this->vars['breadcrumbs'][] = array(
18 'label' => __( 'Notifications', 'latepoint' ),
19 'link' => OsRouterHelper::build_link( OsRouterHelper::build_route_name( 'notifications', 'settings' ) ),
20 );
21 }
22
23 public function templates_index() {
24 $action_id = $this->params['action_id'];
25 $action_type = $this->params['action_type'];
26 $process_id = $this->params['process_id'];
27
28 $templates = OsNotificationsHelper::load_templates_for_action_type( $action_type );
29 $grouped_templates = [];
30 foreach ( $templates as $template ) {
31 $grouped_templates[ $template['to_user_type'] ][] = $template;
32 }
33
34 switch ( $action_type ) {
35 case 'send_email':
36 $this->vars['heading'] = __( 'Select a template', 'latepoint' );
37 break;
38 case 'send_sms':
39 $this->vars['heading'] = __( 'Select a template', 'latepoint' );
40 break;
41 }
42
43 $this->vars['action_type'] = $action_type;
44 $this->vars['action_id'] = $action_id;
45 $this->vars['process_id'] = $process_id;
46
47 $this->vars['selected_template_id'] = false;
48 $this->vars['templates'] = $templates;
49 $this->vars['grouped_templates'] = $grouped_templates;
50 $this->format_render( __FUNCTION__ );
51 }
52 }
53 endif;
54