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 / employees / html / admin / view / delete.php

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

62 lines 1.6 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_Employees_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_Employees_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/employees/' . $id . '/delete',
26 $this->ui->makeList()
27 ->gutter(2)
28 ->add( $this->ui->makeInputSubmit( '__Confirm Delete__')->tag('danger') )
29 );
30
31 $help = array();
32 $help[] = '__When an employee is deleted, all their data and information is permanently removed.__';
33 $help[] = '__This operation cannot be undone.__';
34 $help = $this->ui->makeList( $help );
35
36 $out = $this->ui->makeList( array($help, $out) );
37
38 $this->layout
39 ->setContent( $out )
40 ->setBreadcrumb( $this->self->breadcrumb($model) )
41 ->setHeader( $this->self->header($model) )
42 ;
43
44 $out = $this->layout->render();
45 return $out;
46 }
47
48 public function header( $model )
49 {
50 $out = '__Delete__';
51 return $out;
52 }
53
54 public function breadcrumb( $model )
55 {
56 $return = array();
57 $return['admin'] = array( 'admin', '__Administration__' );
58 $return['admin/employees'] = array( 'admin/employees', '__Employees__' );
59 $return['admin/employees/edit'] = array( 'admin/employees/' . $model->getId(), $model->getTitle() );
60 return $return;
61 }
62 }