@@ -61,8 +61,8 @@ discard block |
||
| 61 | 61 | ]; |
| 62 | 62 | |
| 63 | 63 | if (Arr::key('tooltipPos', $options)) { |
| 64 | - $_options['data-position'] = (string) $options['tooltipPos']; |
|
| 65 | - unset($options['tooltipPos']); |
|
| 64 | + $_options[ 'data-position' ] = (string) $options[ 'tooltipPos' ]; |
|
| 65 | + unset($options[ 'tooltipPos' ]); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | $options = $this->_tooltipTitle($options, $tooltip); |
@@ -82,11 +82,11 @@ discard block |
||
| 82 | 82 | protected function _tooltipTitle(array $options, $tooltip) |
| 83 | 83 | { |
| 84 | 84 | if ($tooltip === true && !Arr::key('title', $options)) { |
| 85 | - $options['title'] = strip_tags($options['label']); |
|
| 85 | + $options[ 'title' ] = strip_tags($options[ 'label' ]); |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | if (is_string($tooltip)) { |
| 89 | - $options['title'] = $tooltip; |
|
| 89 | + $options[ 'title' ] = $tooltip; |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | return $options; |
@@ -102,11 +102,11 @@ discard block |
||
| 102 | 102 | protected function _dataTooltip(array $options, $tooltip) |
| 103 | 103 | { |
| 104 | 104 | if (Arr::key('title', $options)) { |
| 105 | - $options['data-tooltip'] = $options['title']; |
|
| 105 | + $options[ 'data-tooltip' ] = $options[ 'title' ]; |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | if (is_string($tooltip)) { |
| 109 | - $options['data-tooltip'] = $tooltip; |
|
| 109 | + $options[ 'data-tooltip' ] = $tooltip; |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | return $options; |
@@ -32,10 +32,10 @@ |
||
| 32 | 32 | use PrepareHelpers; |
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | - * List of helpers used by this helper. |
|
| 36 | - * |
|
| 37 | - * @var array |
|
| 38 | - */ |
|
| 35 | + * List of helpers used by this helper. |
|
| 36 | + * |
|
| 37 | + * @var array |
|
| 38 | + */ |
|
| 39 | 39 | public $helpers = [ |
| 40 | 40 | 'Url' => ['className' => 'Core.Url'], |
| 41 | 41 | 'Html' => ['className' => 'Backend.Html'], |
@@ -37,8 +37,8 @@ discard block |
||
| 37 | 37 | * @var array |
| 38 | 38 | */ |
| 39 | 39 | public $helpers = [ |
| 40 | - 'Url' => ['className' => 'Core.Url'], |
|
| 41 | - 'Html' => ['className' => 'Backend.Html'], |
|
| 40 | + 'Url' => [ 'className' => 'Core.Url' ], |
|
| 41 | + 'Html' => [ 'className' => 'Backend.Html' ], |
|
| 42 | 42 | ]; |
| 43 | 43 | |
| 44 | 44 | /** |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | public function initialize(array $config) |
| 51 | 51 | { |
| 52 | - $this->_configWrite('prepareBtnClass', function (FormHelper $form, $options, $button) { |
|
| 52 | + $this->_configWrite('prepareBtnClass', function(FormHelper $form, $options, $button) { |
|
| 53 | 53 | return $this->_prepareBtn($form, $options, $button); |
| 54 | 54 | }); |
| 55 | 55 | |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | * @param array $options |
| 70 | 70 | * @return string |
| 71 | 71 | */ |
| 72 | - public function switcher($fieldName, array $options = []) |
|
| 72 | + public function switcher($fieldName, array $options = [ ]) |
|
| 73 | 73 | { |
| 74 | 74 | $input = parent::checkbox($fieldName, $options); |
| 75 | 75 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | 'after' => __d('backend', 'On') |
| 79 | 79 | ]; |
| 80 | 80 | |
| 81 | - $title = (Arr::key('title', $options)) ? $options['title'] : $fieldName; |
|
| 81 | + $title = (Arr::key('title', $options)) ? $options[ 'title' ] : $fieldName; |
|
| 82 | 82 | |
| 83 | 83 | if (!empty($title)) { |
| 84 | 84 | $title = $this->Html->div('switch-title', $title); |
@@ -87,8 +87,8 @@ discard block |
||
| 87 | 87 | $content = $this->formatTemplate(__FUNCTION__, [ |
| 88 | 88 | 'input' => $input, |
| 89 | 89 | 'title' => $title, |
| 90 | - 'after' => $options['after'], |
|
| 91 | - 'before' => $options['before'], |
|
| 90 | + 'after' => $options[ 'after' ], |
|
| 91 | + 'before' => $options[ 'before' ], |
|
| 92 | 92 | 'lever' => '<span class="lever"></span>' |
| 93 | 93 | ]); |
| 94 | 94 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | */ |
| 33 | 33 | public $helpers = [ |
| 34 | 34 | 'Core.Js', |
| 35 | - 'Url' => ['className' => 'Core.Url'], |
|
| 36 | - 'Html' => ['className' => 'Backend.Html'] |
|
| 35 | + 'Url' => [ 'className' => 'Core.Url' ], |
|
| 36 | + 'Html' => [ 'className' => 'Backend.Html' ] |
|
| 37 | 37 | ]; |
| 38 | 38 | } |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | 'type' => 'theme', |
| 32 | 32 | 'backend' => true, |
| 33 | 33 | ], |
| 34 | - 'View.initialize' => function (AppView $view) { |
|
| 34 | + 'View.initialize' => function(AppView $view) { |
|
| 35 | 35 | $helpers = $view->helpers(); |
| 36 | 36 | |
| 37 | 37 | $helpers->unload('Form'); |