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 / hc3 / ui / element / labelledinline.php

labelledinline.php in ShiftController Employee Shift Scheduling 4.9.85, at hc3/ui/element/labelledinline.php

45 lines 1.1 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_Element_LabelledInline extends HC3_Ui_Abstract_Collection
3 {
4 protected $htmlFactory = NULL;
5 protected $label = NULL;
6 protected $content = NULL;
7
8 public function __construct( HC3_Ui $html, $label, $content, $labelFor = NULL )
9 {
10 $this->htmlFactory = $html;
11 $this->label = $label;
12 $this->content = $content;
13 $this->labelFor = $labelFor;
14
15 $this->add( $this->label );
16 $this->add( $this->content );
17 }
18
19 public function render()
20 {
21 // $labelView = $this->htmlFactory->makeElement('label', $this->label);
22 $labelView = $this->htmlFactory->makeBlock( $this->label );
23
24 // if( strlen($this->labelFor) ){
25 // $labelView->addAttr('for', $this->labelFor );
26 // }
27
28 $labelView
29 ->addAttr('class', 'hc-fs2')
30 ->addAttr('class', 'hc-muted2')
31 // ->addAttr('class', 'hc-mt1')
32 ;
33
34 $contentView = $this->htmlFactory->makeBlock( $this->content );
35 // $contentView
36 // ->addAttr('class', 'hc-bold')
37 // ;
38
39 $out = $this->htmlFactory->makeListInline( array($labelView, $contentView) )
40 ->gutter(1)
41 ;
42
43 return $out;
44 }
45 }