PluginProbe
ShiftController Employee Shift Scheduling / 4.9.85
ShiftController Employee Shift Scheduling v4.9.85
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 / calendars / html / admin / view / delete.php

delete.php in ShiftController Employee Shift Scheduling 4.9.85, at sh4/calendars/html/admin/view/delete.php

60 lines 1.5 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 #[AllowDynamicProperties]
3 class SH4_Calendars_Html_Admin_View_Delete
4 {
5 public function __construct(
6 HC3_Hooks $hooks,
7 HC3_Ui $ui,
8 HC3_Ui_Layout1 $layout,
9
10 SH4_Calendars_Query $query
11 )
12 {
13 $this->ui = $ui;
14 $this->layout = $layout;
15
16 $this->query = $hooks->wrap( $query );
17 $this->self = $hooks->wrap($this);
18 }
19
20 public function render( $id )
21 {
22 $model = $this->query->findById( $id );
23
24 $out = $this->ui->makeForm(
25 'admin/calendars/' . $id . '/delete',
26 $this->ui->makeInputSubmit( '__Confirm Delete__')->tag('danger')
27 );
28
29 $help = array();
30 $help[] = '__When a calendar is deleted, all its data and information is permanently removed.__';
31 $help[] = '__This operation cannot be undone.__';
32 $help = $this->ui->makeList( $help );
33
34 $out = $this->ui->makeList( array($help, $out) );
35
36 $this->layout
37 ->setContent( $out )
38 ->setBreadcrumb( $this->self->breadcrumb($model) )
39 ->setHeader( $this->self->header($model) )
40 ;
41
42 $out = $this->layout->render();
43 return $out;
44 }
45
46 public function header( $model )
47 {
48 $out = '__Delete__';
49 return $out;
50 }
51
52 public function breadcrumb( $model )
53 {
54 $return = array();
55 $return['admin'] = array( 'admin', '__Administration__' );
56 $return['calendars'] = array( 'admin/calendars', '__Calendars__' );
57 $return['calendars/edit'] = array( 'admin/calendars/' . $model->getId(), $model->getTitle() );
58 return $return;
59 }
60 }