PluginProbe
ShiftController Employee Shift Scheduling / 4.9.95
ShiftController Employee Shift Scheduling v4.9.95
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 / shifts / view / conflicts.php

conflicts.php in ShiftController Employee Shift Scheduling 4.9.95, at sh4/shifts/view/conflicts.php

58 lines 1.2 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_Shifts_View_Conflicts
4 {
5 public function __construct(
6 HC3_Hooks $hooks,
7
8 HC3_Ui $ui,
9 HC3_Ui_Layout1 $layout,
10
11 SH4_Shifts_View_Common $common,
12 SH4_Shifts_Query $query,
13 SH4_Shifts_Conflicts $conflicts
14 )
15 {
16 $this->ui = $ui;
17 $this->layout = $layout;
18
19 $this->query = $hooks->wrap($query);
20
21 $this->conflicts = $hooks->wrap($conflicts);
22 $this->common = $hooks->wrap($common);
23 $this->self = $hooks->wrap($this);
24 }
25
26 public function render( $id )
27 {
28 // model
29 $model = $this->query->findById($id);
30
31 $out = NULL;
32
33 $conflicts = $this->conflicts->get( $model );
34 if( $conflicts ){
35 $conflictsView = array();
36 foreach( $conflicts as $conflict ){
37 $conflictsView[] = $conflict->render();
38 }
39
40 $out = $this->ui->makeList( $conflictsView );
41 }
42
43 $this->layout
44 ->setContent( $out )
45 ->setBreadcrumb( $this->common->breadcrumb($model) )
46 ->setHeader( $this->self->header($model) )
47 ;
48 $out = $this->layout->render();
49
50 return $out;
51 }
52
53 public function header()
54 {
55 $out = '__Conflicts__';
56 return $out;
57 }
58 }