PluginProbe
ShiftController Employee Shift Scheduling / trunk
ShiftController Employee Shift Scheduling vtrunk
4.9.97 4.9.96 4.9.95 4.9.74 4.9.75 4.9.76 4.9.77 4.9.78 4.9.84 4.9.85 4.9.87 4.9.91 4.9.92 trunk 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 3.2.4 All 38 releases
shiftcontroller / sh4 / ical / boot.php

boot.php in ShiftController Employee Shift Scheduling trunk, at sh4/ical/boot.php

34 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if (! defined('ABSPATH')) exit; // Exit if accessed directly
2 class SH4_Ical_Boot
3 {
4 public function __construct(
5 HC3_Acl $acl,
6 HC3_Router $router,
7 HC3_Hooks $hooks
8 )
9 {
10 $hooks
11 ->add( 'sh4/users/html/user/view/profile::menu::after', function( $return ){
12 $return['ical'] = array( 'user/profile/ical', '__iCal Sync__' );
13 return $return;
14 })
15 ;
16
17 $router
18 ->register( 'get:ical/{token}', array('SH4_Ical_View', 'render') )
19 ->register( 'get:ical/{token}/{calendar}', array('SH4_Ical_View', 'render') )
20 ->register( 'get:ical/{token}/{calendar}/{employee}', array('SH4_Ical_View', 'render') )
21
22 // v3 compat
23 ->register( 'get:ical/export/{token}', array('SH4_Ical_View', 'render') )
24 ->register( 'get:ical/export/{token}/{calendar}', array('SH4_Ical_View', 'render') )
25
26 ->register( 'get:user/profile/ical', array('SH4_Ical_Html_User_View_Profile_Ical', 'render') )
27 ->register( 'post:user/profile/ical', array('SH4_Ical_Html_User_View_Profile_Ical', 'post') )
28 ;
29
30 $acl
31 ->register( 'get:user/profile/ical', array('SH4_App_Acl', 'checkUserProfile') )
32 ;
33 }
34 }