@@ -29,7 +29,7 @@ |
||
29 | 29 | 'type' => 'theme', |
30 | 30 | 'backend' => true, |
31 | 31 | ], |
32 | - 'View.initialize' => function (AppView $view) { |
|
32 | + 'View.initialize' => function(AppView $view) { |
|
33 | 33 | $helpers = $view->helpers()->loaded(); |
34 | 34 | |
35 | 35 | if (Arr::in('Form', $helpers)) { |
@@ -59,9 +59,9 @@ discard block |
||
59 | 59 | 'data-position' => 'top', |
60 | 60 | ]; |
61 | 61 | |
62 | - if (isset($options['tooltipPos'])) { |
|
63 | - $_options['data-position'] = (string) $options['tooltipPos']; |
|
64 | - unset($options['tooltipPos']); |
|
62 | + if (isset($options[ 'tooltipPos' ])) { |
|
63 | + $_options[ 'data-position' ] = (string) $options[ 'tooltipPos' ]; |
|
64 | + unset($options[ 'tooltipPos' ]); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | $options = $this->_tooltipTitle($options, $tooltip); |
@@ -80,12 +80,12 @@ discard block |
||
80 | 80 | */ |
81 | 81 | protected function _tooltipTitle(array $options, $tooltip) |
82 | 82 | { |
83 | - if ($tooltip === true && !isset($options['title'])) { |
|
84 | - $options['title'] = strip_tags($options['label']); |
|
83 | + if ($tooltip === true && !isset($options[ 'title' ])) { |
|
84 | + $options[ 'title' ] = strip_tags($options[ 'label' ]); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | if (is_string($tooltip)) { |
88 | - $options['title'] = $tooltip; |
|
88 | + $options[ 'title' ] = $tooltip; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | return $options; |
@@ -100,12 +100,12 @@ discard block |
||
100 | 100 | */ |
101 | 101 | protected function _dataTooltip(array $options, $tooltip) |
102 | 102 | { |
103 | - if (isset($options['title'])) { |
|
104 | - $options['data-tooltip'] = $options['title']; |
|
103 | + if (isset($options[ 'title' ])) { |
|
104 | + $options[ 'data-tooltip' ] = $options[ 'title' ]; |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | if (is_string($tooltip)) { |
108 | - $options['data-tooltip'] = $tooltip; |
|
108 | + $options[ 'data-tooltip' ] = $tooltip; |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | return $options; |
@@ -36,11 +36,11 @@ |
||
36 | 36 | */ |
37 | 37 | public function initialize(array $config) |
38 | 38 | { |
39 | - $this->_configWrite('prepareBtnClass', function (Helper $form, $options, $button) { |
|
39 | + $this->_configWrite('prepareBtnClass', function(Helper $form, $options, $button) { |
|
40 | 40 | return $this->_prepareBtn($form, $options, $button); |
41 | 41 | }); |
42 | 42 | |
43 | - $this->_configWrite('prepareTooltip', function (Helper $html, $options, $tooltip) { |
|
43 | + $this->_configWrite('prepareTooltip', function(Helper $html, $options, $tooltip) { |
|
44 | 44 | return $this->_prepareTooltip($html, $options, $tooltip); |
45 | 45 | }); |
46 | 46 |
@@ -35,8 +35,8 @@ discard block |
||
35 | 35 | * @var array |
36 | 36 | */ |
37 | 37 | public $helpers = [ |
38 | - 'Url' => ['className' => 'Core.Url'], |
|
39 | - 'Html' => ['className' => 'Backend.Html'], |
|
38 | + 'Url' => [ 'className' => 'Core.Url' ], |
|
39 | + 'Html' => [ 'className' => 'Backend.Html' ], |
|
40 | 40 | ]; |
41 | 41 | |
42 | 42 | /** |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public function initialize(array $config) |
48 | 48 | { |
49 | - $this->_configWrite('prepareBtnClass', function (FormHelper $form, $options, $button) { |
|
49 | + $this->_configWrite('prepareBtnClass', function(FormHelper $form, $options, $button) { |
|
50 | 50 | return $this->_prepareBtn($form, $options, $button); |
51 | 51 | }); |
52 | 52 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | * @param array $options |
67 | 67 | * @return string |
68 | 68 | */ |
69 | - public function switcher($fieldName, array $options = []) |
|
69 | + public function switcher($fieldName, array $options = [ ]) |
|
70 | 70 | { |
71 | 71 | $input = parent::checkbox($fieldName, $options); |
72 | 72 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | 'after' => __d('backend', 'On') |
76 | 76 | ]; |
77 | 77 | |
78 | - $title = (isset($options['title'])) ? $options['title'] : $fieldName; |
|
78 | + $title = (isset($options[ 'title' ])) ? $options[ 'title' ] : $fieldName; |
|
79 | 79 | |
80 | 80 | if (!empty($title)) { |
81 | 81 | $title = $this->Html->div('switch-title', $title); |
@@ -84,8 +84,8 @@ discard block |
||
84 | 84 | $content = $this->formatTemplate(__FUNCTION__, [ |
85 | 85 | 'input' => $input, |
86 | 86 | 'lever' => '<span class="lever"></span>', |
87 | - 'before' => $options['before'], |
|
88 | - 'after' => $options['after'], |
|
87 | + 'before' => $options[ 'before' ], |
|
88 | + 'after' => $options[ 'after' ], |
|
89 | 89 | 'title' => $title, |
90 | 90 | ]); |
91 | 91 |
@@ -35,9 +35,9 @@ |
||
35 | 35 | */ |
36 | 36 | public function render(array $data, ContextInterface $context) |
37 | 37 | { |
38 | - $data += ['class' => '']; |
|
39 | - $data['class'] .= ' filled-in '; |
|
40 | - $data['class'] = trim($data['class']); |
|
38 | + $data += [ 'class' => '' ]; |
|
39 | + $data[ 'class' ] .= ' filled-in '; |
|
40 | + $data[ 'class' ] = trim($data[ 'class' ]); |
|
41 | 41 | |
42 | 42 | return parent::render($data, $context); |
43 | 43 | } |