@@ -1,7 +1,7 @@ |
||
1 | 1 | |
2 | 2 | <?php |
3 | 3 | echo empty($options['noContainer']) ? '<div class="form-group">' : ''; |
4 | -echo $label !== false ? "<label>{$label}" . (!empty($options['required']) ? ' <span class="required-star">*</span>' : '') . "</label>" : ''; |
|
4 | +echo $label !== false ? "<label>{$label}".(!empty($options['required']) ? ' <span class="required-star">*</span>' : '')."</label>" : ''; |
|
5 | 5 | ?> |
6 | 6 | <div class="row"> |
7 | 7 | <div class="col-xs-6"> |
@@ -102,10 +102,10 @@ |
||
102 | 102 | if ($treePath) { |
103 | 103 | $categorys = Category::getList(['where' => ['id', implode(',', $treePath), 'IN']]); |
104 | 104 | foreach ($categorys as $category) { |
105 | - $href .="/{$category->alias}"; |
|
105 | + $href .= "/{$category->alias}"; |
|
106 | 106 | } |
107 | 107 | } |
108 | - return $href . "/" . ($this->alias ? $this->alias : $this->pk()); |
|
108 | + return $href."/".($this->alias ? $this->alias : $this->pk()); |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | public static function relations() |
@@ -38,7 +38,7 @@ |
||
38 | 38 | $table->addRow([ |
39 | 39 | $history->id, |
40 | 40 | $history->wallet->currency->name(), |
41 | - '<span class = "' . ($amount > 0 ? "text-success" : 'text-danger') . '">' . $amount . '</span>', |
|
41 | + '<span class = "'.($amount > 0 ? "text-success" : 'text-danger').'">'.$amount.'</span>', |
|
42 | 42 | $history->comment, |
43 | 43 | $history->date_create |
44 | 44 | ]); |
@@ -29,7 +29,7 @@ |
||
29 | 29 | $model->save(); |
30 | 30 | } |
31 | 31 | } |
32 | - return 'Измненено <b>' . $count . '</b> ' . \Tools::getNumEnding($count, ['запись', 'записи', 'записей']); |
|
32 | + return 'Измненено <b>'.$count.'</b> '.\Tools::getNumEnding($count, ['запись', 'записи', 'записей']); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | ob_end_clean(); |
97 | 97 | header('Content-Encoding: UTF-8'); |
98 | 98 | header("Content-Type: text/csv"); |
99 | - header("Content-Disposition: attachment; filename=" . $request['modelName']::$objectName . '.csv'); |
|
99 | + header("Content-Disposition: attachment; filename=".$request['modelName']::$objectName.'.csv'); |
|
100 | 100 | echo "\xEF\xBB\xBF"; // UTF-8 BOM |
101 | 101 | |
102 | 102 | |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | echo ";"; |
109 | 109 | } |
110 | 110 | $endRow = false; |
111 | - echo '"' . $options['label'] . '"'; |
|
111 | + echo '"'.$options['label'].'"'; |
|
112 | 112 | } |
113 | 113 | echo "\n"; |
114 | 114 | $endRow = true; |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | echo ";"; |
123 | 123 | } |
124 | 124 | $endRow = false; |
125 | - echo '"' . str_replace(["\n", '"'], ['“'], $col) . '"'; |
|
125 | + echo '"'.str_replace(["\n", '"'], ['“'], $col).'"'; |
|
126 | 126 | } |
127 | 127 | echo "\n"; |
128 | 128 | $endRow = true; |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | $pages = $dataManager->getPages($request['params'], $request['model']); |
144 | 144 | if ($pages) { |
145 | 145 | $pages->draw(); |
146 | - echo '<div style="background:#fff;">записей: <b>' . $pages->options['count'] . '</b>. страница <b>' . $pages->params['page'] . '</b> из <b>' . $pages->params['pages'] . '</b></div>'; |
|
146 | + echo '<div style="background:#fff;">записей: <b>'.$pages->options['count'].'</b>. страница <b>'.$pages->params['page'].'</b> из <b>'.$pages->params['pages'].'</b></div>'; |
|
147 | 147 | } |
148 | 148 | $result->content['pages'] = ob_get_contents(); |
149 | 149 | ob_end_clean(); |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | if (!empty($actions[$request['action']])) { |
220 | 220 | $actionParams = $actions[$request['action']]; |
221 | 221 | if (!empty($actionParams['access']['groups']) && !in_array(\Users\User::$cur->group_id, $actionParams['access']['groups'])) { |
222 | - $result->content = 'У вас нет прав доступа к операции ' . (!isset($actionParams['name']) ? $actionParams['className']::$name : $actionParams['name']); |
|
222 | + $result->content = 'У вас нет прав доступа к операции '.(!isset($actionParams['name']) ? $actionParams['className']::$name : $actionParams['name']); |
|
223 | 223 | } else { |
224 | 224 | try { |
225 | 225 | $result->successMsg = $actionParams['className']::groupAction($dataManager, $ids, $actionParams, !empty($_GET['adInfo']) ? $_GET['adInfo'] : []); |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | } |
232 | 232 | } |
233 | 233 | } else { |
234 | - $result->content = 'У вас нет прав доступа к менеджеру ' . $request['managerName'] . ' модели ' . $request['modelName']; |
|
234 | + $result->content = 'У вас нет прав доступа к менеджеру '.$request['managerName'].' модели '.$request['modelName']; |
|
235 | 235 | } |
236 | 236 | $result->send(); |
237 | 237 | } |
@@ -8,7 +8,7 @@ |
||
8 | 8 | } |
9 | 9 | ?>> |
10 | 10 | <?php |
11 | - } |
|
12 | - ?> |
|
11 | + } |
|
12 | + ?> |
|
13 | 13 | <?= !empty($header) ? "<h1>{$header}</h1>" : ''; ?> |
14 | 14 | |
15 | 15 | \ No newline at end of file |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | if (empty($params['activeForm']) || $params['activeForm']->parent === null) { |
3 | 3 | ?> |
4 | - <form <?= $form->id ? 'id="' . $form->id . '"' : ''; ?> action ="<?= $form->action; ?>" method ="<?= $form->method; ?>" enctype="multipart/form-data" |
|
4 | + <form <?= $form->id ? 'id="'.$form->id.'"' : ''; ?> action ="<?= $form->action; ?>" method ="<?= $form->method; ?>" enctype="multipart/form-data" |
|
5 | 5 | <?php |
6 | 6 | foreach ($options as $attribute => $value) { |
7 | 7 | echo " {$attribute} = '{$value}' "; |
@@ -5,10 +5,10 @@ |
||
5 | 5 | <div class="form-group"> |
6 | 6 | <button class ='btn btn-primary' |
7 | 7 | <?php |
8 | - foreach ($attributs as $attribute => $value) { |
|
9 | - echo " {$attribute} = '{$value}' "; |
|
10 | - } |
|
11 | - ?> |
|
8 | + foreach ($attributs as $attribute => $value) { |
|
9 | + echo " {$attribute} = '{$value}' "; |
|
10 | + } |
|
11 | + ?> |
|
12 | 12 | ><?= $btnText; ?></button> |
13 | 13 | </div> |
14 | 14 | <?php |
@@ -62,7 +62,7 @@ |
||
62 | 62 | if ($param->type == 'custom') { |
63 | 63 | $parserName = $param->value; |
64 | 64 | } else { |
65 | - $parserName = '\Migrations\Parser\Object\\' . ucfirst($param->type); |
|
65 | + $parserName = '\Migrations\Parser\Object\\'.ucfirst($param->type); |
|
66 | 66 | } |
67 | 67 | $parser = new $parserName; |
68 | 68 | $parser->data = &$data[$param->code]; |
@@ -23,17 +23,17 @@ |
||
23 | 23 | ?> |
24 | 24 | <ul class="treeview" data-col='tree_path'> |
25 | 25 | <?php |
26 | - if (is_string($objectRoot)) { |
|
27 | - $items = $objectRoot::getList(['where' => ['parent_id', 0]]); |
|
28 | - } else { |
|
29 | - $class = get_class($objectRoot); |
|
30 | - $items = $class::getList(['where' => ['parent_id', $objectRoot->pk()], 'order' => $order]); |
|
31 | - } |
|
32 | - $count += count($items); |
|
33 | - foreach ($items as $objectChild) { |
|
34 | - $count+=static::showLi($objectChild, 1, $maxDeep, $hrefFunc, $order); |
|
35 | - } |
|
36 | - ?> |
|
26 | + if (is_string($objectRoot)) { |
|
27 | + $items = $objectRoot::getList(['where' => ['parent_id', 0]]); |
|
28 | + } else { |
|
29 | + $class = get_class($objectRoot); |
|
30 | + $items = $class::getList(['where' => ['parent_id', $objectRoot->pk()], 'order' => $order]); |
|
31 | + } |
|
32 | + $count += count($items); |
|
33 | + foreach ($items as $objectChild) { |
|
34 | + $count+=static::showLi($objectChild, 1, $maxDeep, $hrefFunc, $order); |
|
35 | + } |
|
36 | + ?> |
|
37 | 37 | </ul> |
38 | 38 | <?php |
39 | 39 | return $count; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | } |
32 | 32 | $count += count($items); |
33 | 33 | foreach ($items as $objectChild) { |
34 | - $count+=static::showLi($objectChild, 1, $maxDeep, $hrefFunc, $order); |
|
34 | + $count += static::showLi($objectChild, 1, $maxDeep, $hrefFunc, $order); |
|
35 | 35 | } |
36 | 36 | ?> |
37 | 37 | </ul> |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $item = $item['text']; |
53 | 53 | } |
54 | 54 | if (!isset($attributes['id'])) { |
55 | - $attributes['id'] = str_replace('\\', '_', get_class($object)) . "-{$object->pk()}"; |
|
55 | + $attributes['id'] = str_replace('\\', '_', get_class($object))."-{$object->pk()}"; |
|
56 | 56 | } |
57 | 57 | if (!$maxDeep || $deep < $maxDeep) { |
58 | 58 | $items = $class::getList(['where' => ['parent_id', $object->pk()], 'order' => $order]); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | echo \Html::el('li', $attributes, $item, true); |
64 | 64 | echo '<ul>'; |
65 | 65 | } |
66 | - $count+=static::showLi($objectChild, $deep + 1, $maxDeep, $hrefFunc, $order); |
|
66 | + $count += static::showLi($objectChild, $deep + 1, $maxDeep, $hrefFunc, $order); |
|
67 | 67 | } |
68 | 68 | } |
69 | 69 | if ($isset) { |