@@ -23,7 +23,7 @@ |
||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | public function parseColsForModel($cols = []) { |
| 26 | - $modelCols = [ 'labels' => [], 'cols' => [], 'relations' => []]; |
|
| 26 | + $modelCols = ['labels' => [], 'cols' => [], 'relations' => []]; |
|
| 27 | 27 | foreach ($cols as $col) { |
| 28 | 28 | $modelCols['labels'][$col['code']] = $col['label']; |
| 29 | 29 | $colType = !empty($col['type']['primary']) ? $col['type']['primary'] : $col['type']; |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | -require_once( INJI_SYSTEM_DIR . '/init.php' ); |
|
| 40 | +require_once(INJI_SYSTEM_DIR . '/init.php'); |
|
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | 43 | * System error messages |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | return [ |
| 4 | - 'up' => function() { |
|
| 4 | + 'up' => function () { |
|
| 5 | 5 | Materials\Material::createCol('date_publish'); |
| 6 | 6 | foreach (Materials\Material::getList() as $material) { |
| 7 | 7 | $material->date_publish = $material->date_create; |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | $this->categoryAction($category->id); |
| 57 | 57 | } |
| 58 | 58 | } |
| 59 | - } elseif(!$material) { |
|
| 59 | + } elseif (!$material) { |
|
| 60 | 60 | $material = Materials\Material::get(1, 'default'); |
| 61 | 61 | } |
| 62 | 62 | if ($material) { |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | 'type' => 'many', |
| 65 | 65 | 'model' => 'Menu\Item', |
| 66 | 66 | 'col' => 'Menu_id', |
| 67 | - 'where'=>[['parent_id',0]] |
|
| 67 | + 'where'=>[['parent_id', 0]] |
|
| 68 | 68 | ], |
| 69 | 69 | 'group' => [ |
| 70 | 70 | 'col' => 'group_id', |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | $code = 'main'; |
| 7 | 7 | } |
| 8 | 8 | $uid = Tools::randomString(); |
| 9 | -$childDraws = function($item, $childDraws, $uid, $activeFind) { |
|
| 9 | +$childDraws = function ($item, $childDraws, $uid, $activeFind) { |
|
| 10 | 10 | if ($item->childs(['order' => ['weight', 'asc']])) { |
| 11 | 11 | echo "<ul class ='dropdown-menu'>"; |
| 12 | 12 | |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | echo "</ul>"; |
| 24 | 24 | } |
| 25 | 25 | }; |
| 26 | -$activeFind = function($item, $activeFind) { |
|
| 26 | +$activeFind = function ($item, $activeFind) { |
|
| 27 | 27 | foreach ($item->childs(['order' => ['weight', 'asc']]) as $item) { |
| 28 | 28 | if (urldecode($_SERVER['REQUEST_URI']) == $item->href) { |
| 29 | 29 | return true; |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | if (empty($code)) { |
| 7 | 7 | $code = 'main'; |
| 8 | 8 | } |
| 9 | -$childDraws = function($item, $childDraws, $activeFind) { |
|
| 9 | +$childDraws = function ($item, $childDraws, $activeFind) { |
|
| 10 | 10 | if ($item->childs(['order' => ['weight', 'asc']])) { |
| 11 | 11 | echo "<ul class ='list-unstyled'>"; |
| 12 | 12 | foreach ($item->childs(['order' => ['weight', 'asc']]) as $item) { |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | echo "</ul>"; |
| 22 | 22 | } |
| 23 | 23 | }; |
| 24 | -$activeFind = function($item, $activeFind) { |
|
| 24 | +$activeFind = function ($item, $activeFind) { |
|
| 25 | 25 | foreach ($item->childs(['order' => ['weight', 'asc']]) as $item) { |
| 26 | 26 | if (urldecode($_SERVER['REQUEST_URI']) == $item->href) { |
| 27 | 27 | return true; |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | |
| 34 | 34 | $options = []; |
| 35 | - $itemParams = \Ecommerce\Item\Param::getList(['where' => ['item_id', $this->model->id],'key'=>'item_option_id']); |
|
| 35 | + $itemParams = \Ecommerce\Item\Param::getList(['where' => ['item_id', $this->model->id], 'key'=>'item_option_id']); |
|
| 36 | 36 | foreach ($this->object->object->params as $param) { |
| 37 | 37 | if ($param->type == 'paramValue' && isset($itemParams[$param->value])) { |
| 38 | 38 | $options[$param->value] = $itemParams[$param->value]->value; |
@@ -368,7 +368,7 @@ |
||
| 368 | 368 | } |
| 369 | 369 | |
| 370 | 370 | $categorys = \Ecommerce\Category::getList(['where' => ['parent_id', 0]]); |
| 371 | - $scan = function($category, $scan) { |
|
| 371 | + $scan = function ($category, $scan) { |
|
| 372 | 372 | $map = []; |
| 373 | 373 | |
| 374 | 374 | foreach ($category->items(['array' => true, 'cols' => ['item_id', 'item_name']]) as $item) { |