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 / hc3 / ui / filter / sidebar.php

sidebar.php in ShiftController Employee Shift Scheduling 4.9.95, at hc3/ui/filter/sidebar.php

61 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 class HC3_Ui_Filter_Sidebar
3 {
4 public function __construct(
5 HC3_Ui $ui
6 )
7 {
8 $this->ui = $ui;
9 }
10
11 public function process( $element )
12 {
13 $tags = $element->getTags();
14 if( ! in_array('sidebar', $tags) ){
15 return $element;
16 }
17
18 $children = $element->getChildren();
19 $keys = array_keys($children);
20
21 foreach( $keys as $key ){
22 $child = $children[$key];
23
24 if( ! is_object($child) ){
25 continue;
26 }
27
28 if( ! method_exists($child, 'getUiType') ){
29 continue;
30 }
31
32 $uiType = $child->getUiType();
33 $tags = $child->getTags();
34
35 if( $uiType == 'ahref' ){
36 $child
37 ->addAttr('class', 'hc-block')
38 ->addAttr('class', 'hc-theme-tab-link')
39 ;
40
41 if( in_array('current', $tags) ){
42 $child
43 ->addAttr('class', 'hc-theme-tab-link-active')
44 ;
45 }
46 }
47 else {
48 $child
49 ->addAttr('class', 'hc-border-bottom')
50 ->addAttr('class', 'hc-border-gray')
51 ->addAttr('class', 'hc-p2')
52 ->addAttr('class', 'hc-fs2')
53 ;
54 }
55
56 $element->setChild( $key, $child );
57 }
58
59 return $element;
60 }
61 }