| 1 |
<?php if (! defined('ABSPATH')) exit; // Exit if accessed directly |
| 2 |
class SH4_Platform_Boot |
| 3 |
{ |
| 4 |
public function __construct( |
| 5 |
HC3_Settings $settings, |
| 6 |
HC3_Hooks $hooks, |
| 7 |
HC3_Router $router |
| 8 |
) |
| 9 |
{ |
| 10 |
$defaultEmail = 'info@' . $_SERVER['SERVER_NAME']; |
| 11 |
|
| 12 |
$settings |
| 13 |
->init( 'email_from', $defaultEmail ) |
| 14 |
->init( 'email_fromname', 'ShiftController' ) |
| 15 |
->init( 'email_html', '1' ) |
| 16 |
; |
| 17 |
|
| 18 |
$hooks |
| 19 |
->add( 'sh4/app/html/view/admin::menu::after', function( $ret ){ |
| 20 |
$ret['32-admin/email'] = array( 'admin/conf/email', '__Email__' ); |
| 21 |
$ret['33-admin/publish'] = array( 'admin/publish', '__Front End__' ); |
| 22 |
return $ret; |
| 23 |
}) |
| 24 |
; |
| 25 |
|
| 26 |
$router |
| 27 |
->register( 'get:admin/conf/email', array('SH4_Conf_Html_Admin_View_Email', 'render') ) |
| 28 |
->register( 'post:admin/conf/email', array('SH4_Conf_Html_Admin_Controller_Email', 'execute') ) |
| 29 |
->register( 'get:admin/publish', array('SH4_Conf_Html_Admin_View_Publish', 'render') ) |
| 30 |
; |
| 31 |
} |
| 32 |
} |