@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | // initialize new DOM model |
32 | 32 | $dom = new Dom(); |
33 | 33 | // return DOM-HTML, build based on closures! |
34 | - return $dom->{$elements['type']}(function () use ($dom, $elements) { |
|
34 | + return $dom->{$elements['type']}(function() use ($dom, $elements) { |
|
35 | 35 | // prepare output avg variable |
36 | 36 | $liHtml = null; |
37 | 37 | // get active order level |
@@ -70,13 +70,13 @@ discard block |
||
70 | 70 | $item['linkProperty']['href'] = self::convertLink($item['link']); |
71 | 71 | |
72 | 72 | // build a href link inside li element |
73 | - $itemContent = $dom->a(function () use ($itemContent) { |
|
73 | + $itemContent = $dom->a(function() use ($itemContent) { |
|
74 | 74 | return $itemContent; |
75 | 75 | }, $item['linkProperty']); |
76 | 76 | } |
77 | 77 | |
78 | 78 | // build output li tag |
79 | - $liHtml .= $dom->li(function () use ($elements, $itemContent) { |
|
79 | + $liHtml .= $dom->li(function() use ($elements, $itemContent) { |
|
80 | 80 | return $itemContent; |
81 | 81 | }, $itemProperty); |
82 | 82 | } |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Created by PhpStorm. |
|
4 | - * User: zenn |
|
5 | - * Date: 03.01.2016 |
|
6 | - * Time: 12:24 |
|
7 | - */ |
|
3 | + * Created by PhpStorm. |
|
4 | + * User: zenn |
|
5 | + * Date: 03.01.2016 |
|
6 | + * Time: 12:24 |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | namespace Ffcms\Core\Helper\HTML\System; |
10 | 10 |
@@ -70,7 +70,7 @@ |
||
70 | 70 | // looks like a single tag, <img src="" class="" />, <hr class="" /> |
71 | 71 | if (Arr::in($name, self::$singleTags)) { |
72 | 72 | return '<' . $name . self::applyProperties($properties) . ' />'; |
73 | - } elseif(Arr::in($name, self::$containerTags)) { // looks like a container tag, <div class=""></div> |
|
73 | + } elseif (Arr::in($name, self::$containerTags)) { // looks like a container tag, <div class=""></div> |
|
74 | 74 | return '<' . $name . self::applyProperties($properties) . '>' . $content . '</' . $name . '>'; |
75 | 75 | } |
76 | 76 |
@@ -41,24 +41,24 @@ discard block |
||
41 | 41 | // init dom model |
42 | 42 | $dom = new Dom(); |
43 | 43 | // draw response |
44 | - $table = $dom->table(function () use ($dom, $elements, $selectOptions) { |
|
44 | + $table = $dom->table(function() use ($dom, $elements, $selectOptions) { |
|
45 | 45 | $res = null; |
46 | 46 | // check if thead is defined |
47 | 47 | if (isset($elements['thead']) && Obj::isArray($elements['thead']) && count($elements['thead']) > 0 && Obj::isArray($elements['thead']['titles'])) { |
48 | 48 | // add thead container |
49 | - $res .= $dom->thead(function () use ($dom, $elements, $selectOptions) { |
|
50 | - return $dom->tr(function () use ($dom, $elements, $selectOptions) { |
|
49 | + $res .= $dom->thead(function() use ($dom, $elements, $selectOptions) { |
|
50 | + return $dom->tr(function() use ($dom, $elements, $selectOptions) { |
|
51 | 51 | $tr = null; |
52 | 52 | foreach ($elements['thead']['titles'] as $order => $title) { |
53 | 53 | $th = htmlentities($title['text']); |
54 | 54 | // make global checkbox for selectable columns |
55 | 55 | if ($selectOptions !== false && $order + 1 === $selectOptions['attachOrder']) { |
56 | - $th = $dom->input(function () { |
|
56 | + $th = $dom->input(function() { |
|
57 | 57 | return null; |
58 | 58 | }, ['type' => 'checkbox', 'name' => 'selectAll']) . ' ' . $th; |
59 | 59 | } |
60 | 60 | // build tr row collecting all th's |
61 | - $tr .= $dom->th(function () use ($th) { |
|
61 | + $tr .= $dom->th(function() use ($th) { |
|
62 | 62 | return $th; |
63 | 63 | }); |
64 | 64 | } |
@@ -77,14 +77,14 @@ discard block |
||
77 | 77 | // sort td items inside row by key increment |
78 | 78 | ksort($row); |
79 | 79 | // add data in tr container |
80 | - $tr .= $dom->tr(function () use ($dom, $row, $selectOptions) { |
|
80 | + $tr .= $dom->tr(function() use ($dom, $row, $selectOptions) { |
|
81 | 81 | $td = null; |
82 | 82 | foreach ($row as $order => $item) { |
83 | 83 | if (!Obj::isInt($order)) { |
84 | 84 | continue; |
85 | 85 | } |
86 | 86 | // collect td item |
87 | - $td .= $dom->td(function () use ($dom, $order, $item, $selectOptions) { |
|
87 | + $td .= $dom->td(function() use ($dom, $order, $item, $selectOptions) { |
|
88 | 88 | $text = null; |
89 | 89 | // make text secure based on passed options |
90 | 90 | if ($item['html'] === true) { |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | } |
99 | 99 | // check if selectable box is enabled and equal current order id |
100 | 100 | if ($selectOptions !== false && $order === $selectOptions['attachOrder']) { |
101 | - $text = $dom->input(function (){ |
|
101 | + $text = $dom->input(function() { |
|
102 | 102 | return null; |
103 | 103 | }, Arr::merge($selectOptions['input'], ['value' => $text])) . ' ' . $text; |
104 | 104 | } |
@@ -123,8 +123,8 @@ discard block |
||
123 | 123 | // build js code for "selectAll" checkbox |
124 | 124 | self::buildSelectorHtml($selectOptions); |
125 | 125 | // return response inside "form" tag |
126 | - return $dom->form(function () use ($dom, $selectOptions, $table){ |
|
127 | - $table .= $dom->input(function () { |
|
126 | + return $dom->form(function() use ($dom, $selectOptions, $table){ |
|
127 | + $table .= $dom->input(function() { |
|
128 | 128 | return null; |
129 | 129 | }, $selectOptions['button']); |
130 | 130 | return $table; |
@@ -18,7 +18,7 @@ |
||
18 | 18 | /** |
19 | 19 | * Construct table based on passed elements as array: properties, thead, tbody, rows, items etc |
20 | 20 | * @param array $elements |
21 | - * @return null |
|
21 | + * @return null|string |
|
22 | 22 | */ |
23 | 23 | public static function display($elements) |
24 | 24 | { |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | * String html tags and escape quotes |
57 | 57 | * @param string|array $html |
58 | 58 | * @param boolean $escapeQuotes |
59 | - * @return string|array|null |
|
59 | + * @return string |
|
60 | 60 | */ |
61 | 61 | public function strip_tags($html, $escapeQuotes = true) |
62 | 62 | { |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | * @deprecated |
97 | 97 | * @param $var |
98 | 98 | * @param null $indent |
99 | - * @return mixed|string |
|
99 | + * @return string |
|
100 | 100 | */ |
101 | 101 | public function var_export54($var, $indent = null, $guessTypes = false) { |
102 | 102 | return Arr::exportVar($var, $indent, $guessTypes); |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use Ffcms\Core\App; |
6 | 6 | use Ffcms\Core\Exception\SyntaxException; |
7 | 7 | use Dflydev\DotAccessData\Data as DotData; |
8 | -use Ffcms\Core\Helper\Type\Arr; |
|
9 | 8 | use Ffcms\Core\Helper\Type\Obj; |
10 | 9 | use Ffcms\Core\Helper\Type\Str; |
11 | 10 | use Ffcms\Core\Filter\Native; |
@@ -169,7 +169,7 @@ |
||
169 | 169 | if ($inputType !== 'file') { |
170 | 170 | if ($html !== true) { |
171 | 171 | $field_value = App::$Security->strip_tags($field_value); |
172 | - } elseif($secure !== true) { |
|
172 | + } elseif ($secure !== true) { |
|
173 | 173 | $field_value = App::$Security->secureHtml($field_value); |
174 | 174 | } |
175 | 175 | } |