@@ -26,7 +26,7 @@ |
||
26 | 26 | */ |
27 | 27 | public function load(array $configs, ContainerBuilder $container) |
28 | 28 | { |
29 | - $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__.'/../Resources/config'))); |
|
29 | + $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__ . '/../Resources/config'))); |
|
30 | 30 | |
31 | 31 | $loader->load('services.yml'); |
32 | 32 | } |
@@ -85,7 +85,7 @@ |
||
85 | 85 | */ |
86 | 86 | public function deleteAction(Request $request, BlockPositionEntity $positionEntity) |
87 | 87 | { |
88 | - if (!$this->hasPermission('ZikulaBlocksModule::position', $positionEntity->getName() .'::'. $positionEntity->getPid(), ACCESS_DELETE)) { |
|
88 | + if (!$this->hasPermission('ZikulaBlocksModule::position', $positionEntity->getName() . '::' . $positionEntity->getPid(), ACCESS_DELETE)) { |
|
89 | 89 | throw new AccessDeniedException(); |
90 | 90 | } |
91 | 91 |
@@ -82,7 +82,7 @@ |
||
82 | 82 | $blockClassName = preg_match('/.*Block$/', $blockClassName) ? $blockClassName : $blockClassName . 'Block'; |
83 | 83 | } catch (\Exception $e) { |
84 | 84 | $moduleBundle = null; |
85 | - $blockClassName = '\\' . ucwords($moduleName).'\\'.'Block\\'.ucwords($blockEntity->getBkey()); |
|
85 | + $blockClassName = '\\' . ucwords($moduleName) . '\\' . 'Block\\' . ucwords($blockEntity->getBkey()); |
|
86 | 86 | $blockClassName = preg_match('/.*Block$/', $blockClassName) ? $blockClassName : $blockClassName . 'Block'; |
87 | 87 | $blockClassNameOld = '\\' . ucwords($moduleName) . '_' . 'Block_' . ucwords($blockEntity->getBkey()); |
88 | 88 | $blockClassName = class_exists($blockClassName) ? $blockClassName : $blockClassNameOld; |
@@ -92,21 +92,21 @@ discard block |
||
92 | 92 | function _htmlList($tree, $treeNodePrefix, $treeClassPrefix, $treeId = '', $treeClass = '', $boostrap = false) |
93 | 93 | { |
94 | 94 | $html = '<ul'; |
95 | - $html .= !empty($treeId) ? ' id="'.$treeId.'"' : ''; |
|
96 | - $html .= !empty($treeClass) ? ' class="'.$treeClass.'"' : ''; |
|
95 | + $html .= !empty($treeId) ? ' id="' . $treeId . '"' : ''; |
|
96 | + $html .= !empty($treeClass) ? ' class="' . $treeClass . '"' : ''; |
|
97 | 97 | $html .= '>'; |
98 | 98 | |
99 | 99 | foreach ($tree as $tab) { |
100 | 100 | $html .= '<li'; |
101 | - $html .= !empty($treeNodePrefix) ? ' id="'.$treeNodePrefix.$tab['item']['id'].'"' : ''; |
|
102 | - $html .= !empty($treeClassPrefix) ? ' class="'.$treeClassPrefix.$tab['item']['id'].'"' : ''; |
|
101 | + $html .= !empty($treeNodePrefix) ? ' id="' . $treeNodePrefix . $tab['item']['id'] . '"' : ''; |
|
102 | + $html .= !empty($treeClassPrefix) ? ' class="' . $treeClassPrefix . $tab['item']['id'] . '"' : ''; |
|
103 | 103 | $html .= '>'; |
104 | - $attr = !empty($tab['item']['title']) ? ' title="'.$tab['item']['title'].'"' : ''; |
|
105 | - $attr .= !empty($tab['item']['class']) ? ' class="'.$tab['item']['class'].'"' : ''; |
|
104 | + $attr = !empty($tab['item']['title']) ? ' title="' . $tab['item']['title'] . '"' : ''; |
|
105 | + $attr .= !empty($tab['item']['class']) ? ' class="' . $tab['item']['class'] . '"' : ''; |
|
106 | 106 | if (!empty($tab['item']['href'])) { |
107 | - $html .= '<a href="'.DataUtil::formatForDisplay($tab['item']['href']).'"'.$attr.'>'.$tab['item']['name'].'</a>'; |
|
107 | + $html .= '<a href="' . DataUtil::formatForDisplay($tab['item']['href']) . '"' . $attr . '>' . $tab['item']['name'] . '</a>'; |
|
108 | 108 | } else { |
109 | - $html .= '<span'.$attr.'>'.$tab['item']['name'].'</span>'; |
|
109 | + $html .= '<span' . $attr . '>' . $tab['item']['name'] . '</span>'; |
|
110 | 110 | } |
111 | 111 | $html .= !empty($tab['nodes']) ? _htmlList($tab['nodes'], $treeNodePrefix, $treeClassPrefix) : ''; |
112 | 112 | $html .= '</li>'; |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | function _htmlListExt($tree, $treeNodePrefix, $treeClassPrefix, $ext, $depth, $treeId = '', $treeClass = '', $bootstrap = false) |
135 | 135 | { |
136 | 136 | $html = '<ul'; |
137 | - $html .= !empty($treeId) ? ' id="'.$treeId.'"' : ''; |
|
137 | + $html .= !empty($treeId) ? ' id="' . $treeId . '"' : ''; |
|
138 | 138 | if ($bootstrap) { |
139 | 139 | $ulClass = (($depth - 1) > 0) ? "dropdown-menu" : ''; |
140 | 140 | if (empty($ulClass)) { |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | } |
143 | 143 | $html .= !empty($ulClass) ? " class='$ulClass'" : ''; |
144 | 144 | } else { |
145 | - $html .= !empty($treeClass) ? ' class="'.$treeClass.' '.$ext['level'].$depth.'"' : ' class="'.$ext['level'].$depth.'"'; |
|
145 | + $html .= !empty($treeClass) ? ' class="' . $treeClass . ' ' . $ext['level'] . $depth . '"' : ' class="' . $ext['level'] . $depth . '"'; |
|
146 | 146 | } |
147 | 147 | $html .= '>'; |
148 | 148 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $classes[] = $size == 1 ? $ext['single'] : ''; |
155 | 155 | $classes[] = ($i == 1 && $size > 1) ? $ext['first'] : ''; |
156 | 156 | $classes[] = ($i == $size && $size > 1) ? $ext['last'] : ''; |
157 | - $classes[] = !empty($treeClassPrefix) ? $treeClassPrefix.$tab['item']['id'] : ''; |
|
157 | + $classes[] = !empty($treeClassPrefix) ? $treeClassPrefix . $tab['item']['id'] : ''; |
|
158 | 158 | $classes[] = !empty($tab['nodes']) ? $ext['parent'] : $ext['childless']; |
159 | 159 | } else { |
160 | 160 | $classes[] = !empty($tab['nodes']) ? $ext['parent'] : ''; |
@@ -163,18 +163,18 @@ discard block |
||
163 | 163 | $i++; |
164 | 164 | |
165 | 165 | $html .= '<li'; |
166 | - $html .= !empty($treeNodePrefix) ? ' id="'.$treeNodePrefix.$tab['item']['id'].'"' : ''; |
|
167 | - $html .= !empty($classList) ? ' class="'.$classList.'">' : '>'; |
|
168 | - $attr = !empty($tab['item']['title']) ? ' title="'.$tab['item']['title'].'"' : ''; |
|
169 | - $attr .= !empty($tab['item']['class']) ? ' class="'.$tab['item']['class'].'"' : ''; |
|
166 | + $html .= !empty($treeNodePrefix) ? ' id="' . $treeNodePrefix . $tab['item']['id'] . '"' : ''; |
|
167 | + $html .= !empty($classList) ? ' class="' . $classList . '">' : '>'; |
|
168 | + $attr = !empty($tab['item']['title']) ? ' title="' . $tab['item']['title'] . '"' : ''; |
|
169 | + $attr .= !empty($tab['item']['class']) ? ' class="' . $tab['item']['class'] . '"' : ''; |
|
170 | 170 | if (!empty($tab['item']['href'])) { |
171 | 171 | if ($bootstrap && in_array('dropdown', $classes)) { |
172 | - $html .= '<a href="#" class="dropdown-toggle" data-toggle="dropdown">'.$tab['item']['name'].' <b class="caret"></b></a>'; |
|
172 | + $html .= '<a href="#" class="dropdown-toggle" data-toggle="dropdown">' . $tab['item']['name'] . ' <b class="caret"></b></a>'; |
|
173 | 173 | } else { |
174 | - $html .= '<a href="'.DataUtil::formatForDisplay($tab['item']['href']).'"'.$attr.'>'.$tab['item']['name'].'</a>'; |
|
174 | + $html .= '<a href="' . DataUtil::formatForDisplay($tab['item']['href']) . '"' . $attr . '>' . $tab['item']['name'] . '</a>'; |
|
175 | 175 | } |
176 | 176 | } else { |
177 | - $html .= '<span'.$attr.'>'.$tab['item']['name'].'</span>'; |
|
177 | + $html .= '<span' . $attr . '>' . $tab['item']['name'] . '</span>'; |
|
178 | 178 | } |
179 | 179 | $html .= !empty($tab['nodes']) ? _htmlListExt($tab['nodes'], $treeNodePrefix, $treeClassPrefix, $ext, $depth + 1, '', '', $bootstrap) : ''; |
180 | 180 | $html .= '</li>'; |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $item['content'] = $params['_content'][$i]; |
133 | 133 | |
134 | 134 | if (!isset($item['id'])) { |
135 | - $item['id'] = 'dummy_'.$i; |
|
135 | + $item['id'] = 'dummy_' . $i; |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | $_node = [ |
@@ -175,21 +175,21 @@ discard block |
||
175 | 175 | */ |
176 | 176 | function _smarty_block_menu_parsemenu_html($tree, $listTag, $listClass = null, $listId = null) |
177 | 177 | { |
178 | - $html = '<'.$listTag; |
|
179 | - $html .= !empty($listId) ? ' id="'.$listId.'"' : ''; |
|
180 | - $html .= !empty($listClass) ? ' class="'.$listClass.'"' : ''; |
|
178 | + $html = '<' . $listTag; |
|
179 | + $html .= !empty($listId) ? ' id="' . $listId . '"' : ''; |
|
180 | + $html .= !empty($listClass) ? ' class="' . $listClass . '"' : ''; |
|
181 | 181 | $html .= '>'; |
182 | 182 | |
183 | 183 | foreach ($tree as $tab) { |
184 | 184 | if (!empty($tab['nodes'])) { |
185 | 185 | $subhtml = _smarty_block_menu_parsemenu_html($tab['nodes'], $listTag); |
186 | - $html .= preg_replace('/<\/li>\s*$/Di', $subhtml.'</li>', $tab['item']['content'], 1); |
|
186 | + $html .= preg_replace('/<\/li>\s*$/Di', $subhtml . '</li>', $tab['item']['content'], 1); |
|
187 | 187 | } else { |
188 | 188 | $html .= $tab['item']['content']; |
189 | 189 | } |
190 | 190 | } |
191 | 191 | |
192 | - $html .= '</'.$listTag.'>'; |
|
192 | + $html .= '</' . $listTag . '>'; |
|
193 | 193 | |
194 | 194 | return $html; |
195 | 195 | } |
@@ -205,14 +205,14 @@ discard block |
||
205 | 205 | $listId = isset($params['id']) ? $params['id'] : null; |
206 | 206 | $listTag = isset($params['tag']) ? $params['tag'] : 'ul'; |
207 | 207 | |
208 | - $html = '<'.$listTag; |
|
209 | - $html .= !empty($listId) ? ' id="'.$listId.'"' : ''; |
|
210 | - $html .= !empty($listClass) ? ' class="'.$listClass.'"' : ''; |
|
208 | + $html = '<' . $listTag; |
|
209 | + $html .= !empty($listId) ? ' id="' . $listId . '"' : ''; |
|
210 | + $html .= !empty($listClass) ? ' class="' . $listClass . '"' : ''; |
|
211 | 211 | $html .= '>'; |
212 | 212 | |
213 | 213 | $html .= $params['_content']; |
214 | 214 | |
215 | - $html .= '</'.$listTag.'>'; |
|
215 | + $html .= '</' . $listTag . '>'; |
|
216 | 216 | |
217 | 217 | return $html; |
218 | 218 | } |
@@ -46,12 +46,12 @@ discard block |
||
46 | 46 | |
47 | 47 | if (null !== $groupType) { |
48 | 48 | $qb->where('g.gtype = :gtype') |
49 | - ->setParameter('gtype', $groupType); |
|
49 | + ->setParameter('gtype', $groupType); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | if (null !== $excludedState) { |
53 | 53 | $qb->andWhere('g.state != :state') |
54 | - ->setParameter('state', $excludedState); |
|
54 | + ->setParameter('state', $excludedState); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | $query = $qb->getQuery(); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $i = 1; |
80 | 80 | foreach ($filters as $w_key => $w_value) { |
81 | 81 | $qb->andWhere($qb->expr()->eq('tbl.' . $w_key, '?' . $i)) |
82 | - ->setParameter($i, $w_value); |
|
82 | + ->setParameter($i, $w_value); |
|
83 | 83 | $i++; |
84 | 84 | } |
85 | 85 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $i = 1; |
88 | 88 | foreach ($exclusions as $w_key => $w_value) { |
89 | 89 | $qb->andWhere($qb->expr()->neq('tbl.' . $w_key, '?' . $i)) |
90 | - ->setParameter($i, $w_value); |
|
90 | + ->setParameter($i, $w_value); |
|
91 | 91 | $i++; |
92 | 92 | } |
93 | 93 | } |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | // already another group by that name. |
164 | 164 | if (is_numeric($excludedGroupId) && $excludedGroupId > 0) { |
165 | 165 | $qb->andWhere($qb->expr()->neq('g.gid', ':ggid')) |
166 | - ->setParameter('ggid', $excludedGroupId); |
|
166 | + ->setParameter('ggid', $excludedGroupId); |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | $query = $qb->getQuery(); |
@@ -26,7 +26,7 @@ |
||
26 | 26 | */ |
27 | 27 | public function load(array $configs, ContainerBuilder $container) |
28 | 28 | { |
29 | - $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__.'/../Resources/config'))); |
|
29 | + $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__ . '/../Resources/config'))); |
|
30 | 30 | |
31 | 31 | $loader->load('services.yml'); |
32 | 32 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | 'numitems' => $this->getVar('itemsperpage') |
64 | 64 | ]); |
65 | 65 | |
66 | - if (!$this->hasPermission('ZikulaGroupsModule::', $group['gid'].'::', ACCESS_EDIT)) { |
|
66 | + if (!$this->hasPermission('ZikulaGroupsModule::', $group['gid'] . '::', ACCESS_EDIT)) { |
|
67 | 67 | throw new AccessDeniedException(); |
68 | 68 | } |
69 | 69 | |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | throw new NotFoundHttpException($this->__('Sorry! No such group found.')); |
263 | 263 | } |
264 | 264 | |
265 | - if (!$this->hasPermission('ZikulaGroupsModule::', $gid.'::', ACCESS_EDIT)) { |
|
265 | + if (!$this->hasPermission('ZikulaGroupsModule::', $gid . '::', ACCESS_EDIT)) { |
|
266 | 266 | throw new AccessDeniedException(); |
267 | 267 | } |
268 | 268 |
@@ -92,11 +92,11 @@ |
||
92 | 92 | $stateLabels = $groupsCommon->stateLabels(); |
93 | 93 | |
94 | 94 | foreach ($groups as $group) { |
95 | - if ($this->hasPermission('ZikulaGroupsModule::', $group['gid'].'::', ACCESS_OVERVIEW)) { |
|
95 | + if ($this->hasPermission('ZikulaGroupsModule::', $group['gid'] . '::', ACCESS_OVERVIEW)) { |
|
96 | 96 | $group['typeLabel'] = $this->__(/** @Ignore */$typeLabels[$group['gtype']]); |
97 | 97 | $group['stateLabel'] = $this->__(/** @Ignore */$stateLabels[$group['state']]); |
98 | 98 | |
99 | - if (true == $isLoggedIn && $this->hasPermission('ZikulaGroupsModule::', $group['gid'].'::', ACCESS_READ)) { |
|
99 | + if (true == $isLoggedIn && $this->hasPermission('ZikulaGroupsModule::', $group['gid'] . '::', ACCESS_READ)) { |
|
100 | 100 | // The right to apply |
101 | 101 | $groupItems[] = $this->get('twig')->render('@ZikulaGroupsModule/User/grouprow_read.html.twig', $group); |
102 | 102 | } else { |