Total Complexity | 5 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
4 | trait CommonComposite |
||
5 | { |
||
6 | /** |
||
7 | * Place the label on the left or right hand side of the switch |
||
8 | * |
||
9 | * @var string left or other |
||
10 | */ |
||
11 | protected $labelClass = "left"; |
||
12 | |||
13 | /** |
||
14 | * setObservables |
||
15 | * |
||
16 | * @param array $names The names of the knockout observables. |
||
17 | * @return $this |
||
18 | */ |
||
19 | public function setObservables($names) |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * getObservables |
||
29 | * |
||
30 | * @return array The observables used by the children |
||
31 | */ |
||
32 | public function getObservables() |
||
33 | { |
||
34 | return $this->children->column('observable'); |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * set the Label class |
||
39 | * |
||
40 | * @param string $name The name of the label class |
||
41 | * @return $this |
||
42 | */ |
||
43 | public function setLabelClass($name) |
||
44 | { |
||
45 | $this->labelClass = trim($name); |
||
46 | return $this; |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * getLabelClass |
||
51 | * |
||
52 | * @return string The label class |
||
53 | */ |
||
54 | public function getLabelClass() |
||
57 | } |
||
58 | } |
||
59 |