@@ -48,7 +48,7 @@ |
||
48 | 48 | throw new Exception\InvalidGridNameException('Не задано имя таблицы для получения данных'); |
49 | 49 | } |
50 | 50 | /** @var GridInterface $grid */ |
51 | - $grid = $this->getServiceLocator()->get('GridManager')->get('grids.' . $gridName); |
|
51 | + $grid = $this->getServiceLocator()->get('GridManager')->get('grids.'.$gridName); |
|
52 | 52 | |
53 | 53 | $adapter = $grid->getAdapter(); |
54 | 54 | if ($adapter instanceof DoctrineDBAL) { |
@@ -57,7 +57,7 @@ |
||
57 | 57 | if (array_key_exists('options', $spec) && $spec['options']) { |
58 | 58 | $options = $spec['options']; |
59 | 59 | } |
60 | - $className = __NAMESPACE__ . '\\' . ucfirst($spec['type']); |
|
60 | + $className = __NAMESPACE__.'\\'.ucfirst($spec['type']); |
|
61 | 61 | $reflectionClass = new ReflectionClass($className); |
62 | 62 | if (!$reflectionClass->isInstantiable()) { |
63 | 63 | throw new Exception\RuntimeException( |
@@ -68,7 +68,7 @@ |
||
68 | 68 | $options = array_merge($this->getRouteOptions(), $this->getRowData()); |
69 | 69 | return '<a href="' |
70 | 70 | . $this->getUrl($urlHelper($this->getRouteName(), $this->getRouteParams(), $options)) |
71 | - . '">' . $value . '</a>'; |
|
71 | + . '">'.$value.'</a>'; |
|
72 | 72 | } |
73 | 73 | |
74 | 74 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | 2 | // Generated by ZF2's ./bin/templatemap_generator.php |
3 | 3 | return array( |
4 | - 'grid/data/get' => __DIR__ . '/view/grid/data/get.phtml', |
|
4 | + 'grid/data/get' => __DIR__.'/view/grid/data/get.phtml', |
|
5 | 5 | ); |
@@ -57,7 +57,7 @@ |
||
57 | 57 | if (array_key_exists('options', $spec) && $spec['options']) { |
58 | 58 | $options = $spec['options']; |
59 | 59 | } |
60 | - $className = __NAMESPACE__ . '\\' . ucfirst($spec['type']); |
|
60 | + $className = __NAMESPACE__.'\\'.ucfirst($spec['type']); |
|
61 | 61 | $reflectionClass = new ReflectionClass($className); |
62 | 62 | if (!$reflectionClass->isInstantiable()) { |
63 | 63 | throw new Exception\RuntimeException( |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | if (count($this->getConditions()) !== 0) { |
112 | 112 | foreach ($this->getConditions() as $condition) { |
113 | 113 | $conditionKey = 'NNXGridCondition_'.$i; |
114 | - $query->andWhere($condition->getKey() . ' ' . $condition->getCriteria() . ' :'.$conditionKey); |
|
114 | + $query->andWhere($condition->getKey().' '.$condition->getCriteria().' :'.$conditionKey); |
|
115 | 115 | $query->setParameter($conditionKey, $condition->getValue()); |
116 | 116 | $i++; |
117 | 117 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | } |
139 | 139 | $query = clone $query; |
140 | 140 | $this->setCountQuery($query |
141 | - ->select('COUNT(DISTINCT ' . $this->getRootAlias() . '.id) AS total_results') |
|
141 | + ->select('COUNT(DISTINCT '.$this->getRootAlias().'.id) AS total_results') |
|
142 | 142 | ->resetQueryParts(['groupBy', 'orderBy']) |
143 | 143 | ->setMaxResults(1) |
144 | 144 | ); |
@@ -26,7 +26,7 @@ |
||
26 | 26 | $attributes = $column->getAttributes(); |
27 | 27 | $config = [ |
28 | 28 | 'hidden' => true, |
29 | - 'hidedlg' => empty($attributes['hidedlg']) ? false: (bool)$attributes['hidedlg'], |
|
29 | + 'hidedlg' => empty($attributes['hidedlg']) ? false : (bool)$attributes['hidedlg'], |
|
30 | 30 | 'name' => $escape($column->getName()) |
31 | 31 | ]; |
32 | 32 | $config = array_merge($config, $column->getAttributes()); |
@@ -50,7 +50,6 @@ |
||
50 | 50 | |
51 | 51 | /** |
52 | 52 | * Создает экземпляр класса фабрики |
53 | - * @param array|Traversable $spec |
|
54 | 53 | * @throws InvalidButtonException |
55 | 54 | * @throws InvalidNameException |
56 | 55 | * @throws InValidSpecificationException |
@@ -57,7 +57,7 @@ |
||
57 | 57 | if (array_key_exists('options', $spec) && $spec['options']) { |
58 | 58 | $options = $spec['options']; |
59 | 59 | } |
60 | - $className = __NAMESPACE__ . '\\' . ucfirst($spec['type']); |
|
60 | + $className = __NAMESPACE__.'\\'.ucfirst($spec['type']); |
|
61 | 61 | $reflectionClass = new ReflectionClass($className); |
62 | 62 | if (!$reflectionClass->isInstantiable()) { |
63 | 63 | throw new Exception\RuntimeException( |
@@ -117,7 +117,7 @@ |
||
117 | 117 | /** |
118 | 118 | * @param string $key |
119 | 119 | * @param array $options |
120 | - * @param mixed $default |
|
120 | + * @param string $default |
|
121 | 121 | * @return null|string|array |
122 | 122 | */ |
123 | 123 | protected function getConfigVal($key, array $options, $default = null) |
@@ -38,8 +38,8 @@ discard block |
||
38 | 38 | $escape = $view->plugin('escapeHtml'); |
39 | 39 | $bottomNavigationBar = $this->renderNavigationBar($grid->getBottomNavigationBar()); |
40 | 40 | $topNavigationBar = $this->renderNavigationBar($grid->getTopNavigationBar()); |
41 | - $res = $topNavigationBar['html'] . '<table id="grid-' . $escape($grid->getName()) . '"></table>' . $bottomNavigationBar['html']; |
|
42 | - $buttonsJs = $topNavigationBar['js'] . $bottomNavigationBar['js']; |
|
41 | + $res = $topNavigationBar['html'].'<table id="grid-'.$escape($grid->getName()).'"></table>'.$bottomNavigationBar['html']; |
|
42 | + $buttonsJs = $topNavigationBar['js'].$bottomNavigationBar['js']; |
|
43 | 43 | /** @var PhpRenderer $view */ |
44 | 44 | $view = $this->getView(); |
45 | 45 | $config = $this->getGridConfig($grid); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $columnClass = get_class($column); |
48 | 48 | $columnPath = explode('\\', $columnClass); |
49 | 49 | $colName = array_pop($columnPath); |
50 | - $helperName = 'nnxGridJqGrid' . $colName; |
|
50 | + $helperName = 'nnxGridJqGrid'.$colName; |
|
51 | 51 | /** @var string $columnsJqOptions */ |
52 | 52 | $config['colModel'][] = $view->$helperName($column); |
53 | 53 | } |
@@ -57,9 +57,9 @@ discard block |
||
57 | 57 | foreach ($mutators as $mutator) { |
58 | 58 | if ($mutator instanceof HighlightMutatorInterface) { |
59 | 59 | $config['rowattr'] = '%rowAttrFunction%'; |
60 | - $rowAttr = 'function(rd) {' . |
|
61 | - 'if(rd.' . $mutator->getDataName() . ') {' |
|
62 | - . 'return {"class": rd.' . $mutator->getDataName() . '};' |
|
60 | + $rowAttr = 'function(rd) {'. |
|
61 | + 'if(rd.'.$mutator->getDataName().') {' |
|
62 | + . 'return {"class": rd.'.$mutator->getDataName().'};' |
|
63 | 63 | . '}' |
64 | 64 | . '}'; |
65 | 65 | } |
@@ -73,9 +73,9 @@ discard block |
||
73 | 73 | ); |
74 | 74 | |
75 | 75 | $view->headScript()->appendScript('$(function(){' |
76 | - . 'var grid = $("#grid-' . $grid->getName() . '").jqGrid(' |
|
77 | - . str_replace('"%rowAttrFunction%"', $rowAttr, $options) . ');' |
|
78 | - . str_replace('%gridName%', $grid->getName(), $buttonsJs) . '});'); |
|
76 | + . 'var grid = $("#grid-'.$grid->getName().'").jqGrid(' |
|
77 | + . str_replace('"%rowAttrFunction%"', $rowAttr, $options).');' |
|
78 | + . str_replace('%gridName%', $grid->getName(), $buttonsJs).'});'); |
|
79 | 79 | return $res; |
80 | 80 | } |
81 | 81 | |
@@ -98,12 +98,12 @@ discard block |
||
98 | 98 | /** @var ButtonInterface $button */ |
99 | 99 | foreach ($navigationBar->getButtons() as $button) { |
100 | 100 | $buttonResult = $view->nnxGridJqGridButton($button, $urlVariables); |
101 | - $html .= $buttonResult['html']; |
|
102 | - $js .= $buttonResult['js']; |
|
101 | + $html .= $buttonResult['html']; |
|
102 | + $js .= $buttonResult['js']; |
|
103 | 103 | } |
104 | 104 | $html = "<div class='buttons-panel'>$html</div><br>"; |
105 | 105 | } |
106 | - return ['html' => $html,'js' => $js]; |
|
106 | + return ['html' => $html, 'js' => $js]; |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | /** |