@@ -282,9 +282,9 @@ discard block |
||
282 | 282 | |
283 | 283 | $qb = $this->getEntityManager()->createQueryBuilder(); |
284 | 284 | $qb->update('Zikula\RoutesModule\Entity\RouteEntity', 'tbl') |
285 | - ->set('tbl.createdUserId', $newUserId) |
|
286 | - ->where('tbl.createdUserId = :creator') |
|
287 | - ->setParameter('creator', $userId); |
|
285 | + ->set('tbl.createdUserId', $newUserId) |
|
286 | + ->where('tbl.createdUserId = :creator') |
|
287 | + ->setParameter('creator', $userId); |
|
288 | 288 | $query = $qb->getQuery(); |
289 | 289 | $query->execute(); |
290 | 290 | |
@@ -315,9 +315,9 @@ discard block |
||
315 | 315 | |
316 | 316 | $qb = $this->getEntityManager()->createQueryBuilder(); |
317 | 317 | $qb->update('Zikula\RoutesModule\Entity\RouteEntity', 'tbl') |
318 | - ->set('tbl.updatedUserId', $newUserId) |
|
319 | - ->where('tbl.updatedUserId = :editor') |
|
320 | - ->setParameter('editor', $userId); |
|
318 | + ->set('tbl.updatedUserId', $newUserId) |
|
319 | + ->where('tbl.updatedUserId = :editor') |
|
320 | + ->setParameter('editor', $userId); |
|
321 | 321 | $query = $qb->getQuery(); |
322 | 322 | $query->execute(); |
323 | 323 | |
@@ -346,8 +346,8 @@ discard block |
||
346 | 346 | |
347 | 347 | $qb = $this->getEntityManager()->createQueryBuilder(); |
348 | 348 | $qb->delete('Zikula\RoutesModule\Entity\RouteEntity', 'tbl') |
349 | - ->where('tbl.createdUserId = :creator') |
|
350 | - ->setParameter('creator', $userId); |
|
349 | + ->where('tbl.createdUserId = :creator') |
|
350 | + ->setParameter('creator', $userId); |
|
351 | 351 | $query = $qb->getQuery(); |
352 | 352 | |
353 | 353 | $query->execute(); |
@@ -377,8 +377,8 @@ discard block |
||
377 | 377 | |
378 | 378 | $qb = $this->getEntityManager()->createQueryBuilder(); |
379 | 379 | $qb->delete('Zikula\RoutesModule\Entity\RouteEntity', 'tbl') |
380 | - ->where('tbl.updatedUserId = :editor') |
|
381 | - ->setParameter('editor', $userId); |
|
380 | + ->where('tbl.updatedUserId = :editor') |
|
381 | + ->setParameter('editor', $userId); |
|
382 | 382 | $query = $qb->getQuery(); |
383 | 383 | |
384 | 384 | $query->execute(); |
@@ -474,7 +474,7 @@ discard block |
||
474 | 474 | { |
475 | 475 | if ($excludeId > 0) { |
476 | 476 | $qb->andWhere('tbl.id != :excludeId') |
477 | - ->setParameter('excludeId', $excludeId); |
|
477 | + ->setParameter('excludeId', $excludeId); |
|
478 | 478 | } |
479 | 479 | |
480 | 480 | return $qb; |
@@ -536,7 +536,7 @@ discard block |
||
536 | 536 | $offset = ($currentPage-1) * $resultsPerPage; |
537 | 537 | |
538 | 538 | $query->setFirstResult($offset) |
539 | - ->setMaxResults($resultsPerPage); |
|
539 | + ->setMaxResults($resultsPerPage); |
|
540 | 540 | $count = 0; // will be set at a later stage (in calling method) |
541 | 541 | |
542 | 542 | |
@@ -632,14 +632,14 @@ discard block |
||
632 | 632 | if ((!is_numeric($v) && $v != '') || (is_numeric($v) && $v > 0)) { |
633 | 633 | if ($k == 'workflowState' && substr($v, 0, 1) == '!') { |
634 | 634 | $qb->andWhere('tbl.' . $k . ' != :' . $k) |
635 | - ->setParameter($k, substr($v, 1, strlen($v)-1)); |
|
635 | + ->setParameter($k, substr($v, 1, strlen($v)-1)); |
|
636 | 636 | } elseif (substr($v, 0, 1) == '%') { |
637 | 637 | $qb->andWhere('tbl.' . $k . ' LIKE :' . $k) |
638 | - ->setParameter($k, '%' . $v . '%'); |
|
638 | + ->setParameter($k, '%' . $v . '%'); |
|
639 | 639 | } else { |
640 | 640 | $qb->andWhere('tbl.' . $k . ' = :' . $k) |
641 | - ->setParameter($k, $v); |
|
642 | - } |
|
641 | + ->setParameter($k, $v); |
|
642 | + } |
|
643 | 643 | } |
644 | 644 | } |
645 | 645 | } |
@@ -680,7 +680,7 @@ discard block |
||
680 | 680 | $qb = $this->genericBaseQuery('', $orderBy, $useJoins); |
681 | 681 | if (count($exclude) > 0) { |
682 | 682 | $qb->andWhere('tbl.id NOT IN (:excludeList)') |
683 | - ->setParameter('excludeList', $exclude); |
|
683 | + ->setParameter('excludeList', $exclude); |
|
684 | 684 | } |
685 | 685 | |
686 | 686 | $qb = $this->addSearchFilter($qb, $fragment); |
@@ -820,7 +820,7 @@ discard block |
||
820 | 820 | |
821 | 821 | $qb = $this->getEntityManager()->createQueryBuilder(); |
822 | 822 | $qb->select($selection) |
823 | - ->from('Zikula\RoutesModule\Entity\RouteEntity', 'tbl'); |
|
823 | + ->from('Zikula\RoutesModule\Entity\RouteEntity', 'tbl'); |
|
824 | 824 | |
825 | 825 | if ($useJoins === true) { |
826 | 826 | $this->addJoinsToFrom($qb); |
@@ -865,7 +865,7 @@ discard block |
||
865 | 865 | { |
866 | 866 | $qb = $this->getCountQuery('', false); |
867 | 867 | $qb->andWhere('tbl.' . $fieldName . ' = :' . $fieldName) |
868 | - ->setParameter($fieldName, $fieldValue); |
|
868 | + ->setParameter($fieldName, $fieldValue); |
|
869 | 869 | |
870 | 870 | $qb = $this->addExclusion($qb, $excludeId); |
871 | 871 | |
@@ -911,7 +911,7 @@ discard block |
||
911 | 911 | |
912 | 912 | $qb = $this->getEntityManager()->createQueryBuilder(); |
913 | 913 | $qb->select($selection) |
914 | - ->from('Zikula\RoutesModule\Entity\RouteEntity', 'tbl'); |
|
914 | + ->from('Zikula\RoutesModule\Entity\RouteEntity', 'tbl'); |
|
915 | 915 | |
916 | 916 | if ($useJoins === true) { |
917 | 917 | $this->addJoinsToFrom($qb); |
@@ -991,7 +991,7 @@ discard block |
||
991 | 991 | |
992 | 992 | $uid = $this->getRequest()->getSession()->get('uid'); |
993 | 993 | $qb->andWhere('tbl.createdUserId = :creator') |
994 | - ->setParameter('creator', $uid); |
|
994 | + ->setParameter('creator', $uid); |
|
995 | 995 | } |
996 | 996 | |
997 | 997 | return $qb; |
@@ -1010,7 +1010,7 @@ discard block |
||
1010 | 1010 | if ($orderBy == 'RAND()') { |
1011 | 1011 | // random selection |
1012 | 1012 | $qb->addSelect('MOD(tbl.id, ' . mt_rand(2, 15) . ') AS HIDDEN randomIdentifiers') |
1013 | - ->add('orderBy', 'randomIdentifiers'); |
|
1013 | + ->add('orderBy', 'randomIdentifiers'); |
|
1014 | 1014 | $orderBy = ''; |
1015 | 1015 | } elseif (empty($orderBy)) { |
1016 | 1016 | $orderBy = $this->defaultSortingField; |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | $qb = $this->addCommonViewFilters($qb); |
534 | 534 | |
535 | 535 | $query = $this->getQueryFromBuilder($qb); |
536 | - $offset = ($currentPage-1) * $resultsPerPage; |
|
536 | + $offset = ($currentPage - 1) * $resultsPerPage; |
|
537 | 537 | |
538 | 538 | $query->setFirstResult($offset) |
539 | 539 | ->setMaxResults($resultsPerPage); |
@@ -632,7 +632,7 @@ discard block |
||
632 | 632 | if ((!is_numeric($v) && $v != '') || (is_numeric($v) && $v > 0)) { |
633 | 633 | if ($k == 'workflowState' && substr($v, 0, 1) == '!') { |
634 | 634 | $qb->andWhere('tbl.' . $k . ' != :' . $k) |
635 | - ->setParameter($k, substr($v, 1, strlen($v)-1)); |
|
635 | + ->setParameter($k, substr($v, 1, strlen($v) - 1)); |
|
636 | 636 | } elseif (substr($v, 0, 1) == '%') { |
637 | 637 | $qb->andWhere('tbl.' . $k . ' LIKE :' . $k) |
638 | 638 | ->setParameter($k, '%' . $v . '%'); |
@@ -708,7 +708,7 @@ |
||
708 | 708 | } |
709 | 709 | // execute the workflow action |
710 | 710 | $success = $workflowHelper->executeAction($entity, $action); |
711 | - } catch(\Exception $e) { |
|
711 | + } catch (\Exception $e) { |
|
712 | 712 | $this->addFlash('error', $this->__f('Sorry, but an unknown error occured during the %s action. Please apply the changes again!', ['%s' => $action])); |
713 | 713 | $logger->error('{app}: User {user} tried to execute the {action} workflow action for the {entity} with id {id}, but failed. Error details: {errorMessage}.', ['app' => 'ZikulaRoutesModule', 'user' => $userName, 'action' => $action, 'entity' => 'route', 'id' => $itemid, 'errorMessage' => $e->getMessage()]); |
714 | 714 | } |
@@ -92,13 +92,13 @@ |
||
92 | 92 | $path = \DataUtil::formatForDisplay($route->getPathWithBundlePrefix()); |
93 | 93 | $container = \ServiceUtil::getManager(); |
94 | 94 | |
95 | - $path = preg_replace_callback('#%(.*?)%#', function ($matches) use ($container) { |
|
95 | + $path = preg_replace_callback('#%(.*?)%#', function($matches) use ($container) { |
|
96 | 96 | return '<abbr title="' . \DataUtil::formatForDisplay($matches[0]) . '">' . \DataUtil::formatForDisplay($container->getParameter($matches[1])) . '</abbr>'; |
97 | 97 | }, $path); |
98 | 98 | |
99 | 99 | $defaults = $route->getDefaults(); |
100 | 100 | $requirements = $route->getRequirements(); |
101 | - $path = preg_replace_callback('#{(.*?)}#', function ($matches) use ($container, $defaults, $requirements) { |
|
101 | + $path = preg_replace_callback('#{(.*?)}#', function($matches) use ($container, $defaults, $requirements) { |
|
102 | 102 | $title = ''; |
103 | 103 | if (isset($defaults[$matches[1]])) { |
104 | 104 | $title .= $this->translator->__f('Default: %s', ['%s' => \DataUtil::formatForDisplay($defaults[$matches[1]])]); |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | 'attr' => [ |
94 | 94 | 'class' => '', |
95 | 95 | 'title' => $this->__('Choose the route type') |
96 | - ],'placeholder' => '', |
|
96 | + ], 'placeholder' => '', |
|
97 | 97 | 'choices' => $choices, |
98 | 98 | 'choices_as_values' => true, |
99 | 99 | 'choice_attr' => $choiceAttributes, |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | 'attr' => [ |
107 | 107 | 'class' => '', |
108 | 108 | 'title' => $this->__('Enter the replaced route name of the route') |
109 | - ],'required' => false, |
|
109 | + ], 'required' => false, |
|
110 | 110 | 'max_length' => 255, |
111 | 111 | ]); |
112 | 112 | $builder->add('bundle', 'Symfony\Component\Form\Extension\Core\Type\TextType', [ |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | 'attr' => [ |
116 | 116 | 'class' => '', |
117 | 117 | 'title' => $this->__('Enter the bundle of the route') |
118 | - ],'required' => true, |
|
118 | + ], 'required' => true, |
|
119 | 119 | 'max_length' => 255, |
120 | 120 | ]); |
121 | 121 | $builder->add('controller', 'Symfony\Component\Form\Extension\Core\Type\TextType', [ |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | 'attr' => [ |
125 | 125 | 'class' => '', |
126 | 126 | 'title' => $this->__('Enter the controller of the route') |
127 | - ],'required' => true, |
|
127 | + ], 'required' => true, |
|
128 | 128 | 'max_length' => 255, |
129 | 129 | ]); |
130 | 130 | $builder->add('action', 'Symfony\Component\Form\Extension\Core\Type\TextType', [ |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | 'attr' => [ |
134 | 134 | 'class' => '', |
135 | 135 | 'title' => $this->__('Enter the action of the route') |
136 | - ],'required' => true, |
|
136 | + ], 'required' => true, |
|
137 | 137 | 'max_length' => 255, |
138 | 138 | ]); |
139 | 139 | $builder->add('path', 'Symfony\Component\Form\Extension\Core\Type\TextType', [ |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | 'attr' => [ |
143 | 143 | 'class' => '', |
144 | 144 | 'title' => $this->__('Enter the path of the route') |
145 | - ],'required' => true, |
|
145 | + ], 'required' => true, |
|
146 | 146 | 'max_length' => 255, |
147 | 147 | ]); |
148 | 148 | $builder->add('host', 'Symfony\Component\Form\Extension\Core\Type\TextType', [ |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | 'attr' => [ |
152 | 152 | 'class' => '', |
153 | 153 | 'title' => $this->__('Enter the host of the route') |
154 | - ],'required' => false, |
|
154 | + ], 'required' => false, |
|
155 | 155 | 'max_length' => 255, |
156 | 156 | ]); |
157 | 157 | $listEntries = $this->listHelper->getEntries('route', 'schemes'); |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | 'attr' => [ |
168 | 168 | 'class' => '', |
169 | 169 | 'title' => $this->__('Choose the schemes') |
170 | - ],'placeholder' => '', |
|
170 | + ], 'placeholder' => '', |
|
171 | 171 | 'choices' => $choices, |
172 | 172 | 'choices_as_values' => true, |
173 | 173 | 'choice_attr' => $choiceAttributes, |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | 'attr' => [ |
188 | 188 | 'class' => '', |
189 | 189 | 'title' => $this->__('Choose the methods') |
190 | - ],'placeholder' => '', |
|
190 | + ], 'placeholder' => '', |
|
191 | 191 | 'choices' => $choices, |
192 | 192 | 'choices_as_values' => true, |
193 | 193 | 'choice_attr' => $choiceAttributes, |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | 'attr' => [ |
201 | 201 | 'class' => '', |
202 | 202 | 'title' => $this->__('prepend bundle prefix ?') |
203 | - ],'required' => true, |
|
203 | + ], 'required' => true, |
|
204 | 204 | ]); |
205 | 205 | $builder->add('translatable', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', [ |
206 | 206 | 'label' => $this->__('Translatable') . ':', |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | 'attr' => [ |
209 | 209 | 'class' => '', |
210 | 210 | 'title' => $this->__('translatable ?') |
211 | - ],'required' => true, |
|
211 | + ], 'required' => true, |
|
212 | 212 | ]); |
213 | 213 | $builder->add('translationPrefix', 'Symfony\Component\Form\Extension\Core\Type\TextType', [ |
214 | 214 | 'label' => $this->__('Translation prefix') . ':', |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | 'attr' => [ |
217 | 217 | 'class' => '', |
218 | 218 | 'title' => $this->__('Enter the translation prefix of the route') |
219 | - ],'required' => false, |
|
219 | + ], 'required' => false, |
|
220 | 220 | 'max_length' => 255, |
221 | 221 | ]); |
222 | 222 | $builder->add('condition', 'Symfony\Component\Form\Extension\Core\Type\TextType', [ |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | 'attr' => [ |
226 | 226 | 'class' => '', |
227 | 227 | 'title' => $this->__('Enter the condition of the route') |
228 | - ],'required' => false, |
|
228 | + ], 'required' => false, |
|
229 | 229 | 'max_length' => 255, |
230 | 230 | ]); |
231 | 231 | $builder->add('description', 'Symfony\Component\Form\Extension\Core\Type\TextType', [ |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | 'attr' => [ |
235 | 235 | 'class' => '', |
236 | 236 | 'title' => $this->__('Enter the description of the route') |
237 | - ],'required' => false, |
|
237 | + ], 'required' => false, |
|
238 | 238 | 'max_length' => 255, |
239 | 239 | ]); |
240 | 240 | $builder->add('sort', 'Symfony\Component\Form\Extension\Core\Type\IntegerType', [ |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | 'attr' => [ |
244 | 244 | 'class' => ' validate-digits', |
245 | 245 | 'title' => $this->__('Enter the sort of the route. Only digits are allowed.') |
246 | - ],'required' => false, |
|
246 | + ], 'required' => false, |
|
247 | 247 | 'max_length' => 11, |
248 | 248 | 'scale' => 0 |
249 | 249 | ]); |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | 'attr' => [ |
254 | 254 | 'class' => '', |
255 | 255 | 'title' => $this->__('Enter the group of the route') |
256 | - ],'required' => false, |
|
256 | + ], 'required' => false, |
|
257 | 257 | 'max_length' => 255, |
258 | 258 | ]); |
259 | 259 | } |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | ->setDefaults([ |
327 | 327 | // define class for underlying data (required for embedding forms) |
328 | 328 | 'data_class' => 'Zikula\RoutesModule\Entity\RouteEntity', |
329 | - 'empty_data' => function (FormInterface $form) { |
|
329 | + 'empty_data' => function(FormInterface $form) { |
|
330 | 330 | return $this->entityFactory->createRoute(); |
331 | 331 | }, |
332 | 332 | 'error_mapping' => [ |
@@ -197,7 +197,7 @@ |
||
197 | 197 | // execute the workflow action |
198 | 198 | $workflowHelper = $this->container->get('zikula_routes_module.workflow_helper'); |
199 | 199 | $success = $workflowHelper->executeAction($entity, $action); |
200 | - } catch(\Exception $e) { |
|
200 | + } catch (\Exception $e) { |
|
201 | 201 | $flashBag->add('error', $this->__f('Sorry, but an unknown error occured during the %action% action. Please apply the changes again!', ['%action%' => $action])); |
202 | 202 | $logArgs = ['app' => 'ZikulaRoutesModule', 'user' => $this->container->get('zikula_users_module.current_user')->get('uname'), 'entity' => 'route', 'id' => $entity->createCompositeIdentifier(), 'errorMessage' => $e->getMessage()]; |
203 | 203 | $logger->error('{app}: User {user} tried to edit the {entity} with id {id}, but failed. Error details: {errorMessage}.', $logArgs); |
@@ -47,8 +47,8 @@ |
||
47 | 47 | { |
48 | 48 | $entity = $this->entityRef; |
49 | 49 | |
50 | - list($controller, ) = $this->sanitizeController($entity['controller']); |
|
51 | - list($action, ) = $this->sanitizeAction($entity['action']); |
|
50 | + list($controller,) = $this->sanitizeController($entity['controller']); |
|
51 | + list($action,) = $this->sanitizeAction($entity['action']); |
|
52 | 52 | |
53 | 53 | $entity['controller'] = $controller; |
54 | 54 | $entity['action'] = $action; |
@@ -102,9 +102,9 @@ |
||
102 | 102 | && $this->permissionApi->hasPermission($this->getBundleName() . ':Route:', '::', $permLevel)) { |
103 | 103 | $links[] = [ |
104 | 104 | 'url' => $this->router->generate('zikularoutesmodule_route_adminview'), |
105 | - 'text' => $this->__('Routes'), |
|
106 | - 'title' => $this->__('Route list') |
|
107 | - ]; |
|
105 | + 'text' => $this->__('Routes'), |
|
106 | + 'title' => $this->__('Route list') |
|
107 | + ]; |
|
108 | 108 | } |
109 | 109 | } |
110 | 110 |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | } else { |
146 | 146 | // single identifier |
147 | 147 | if (array_key_exists($idField, $routeParams)) { |
148 | - $id = (int) !empty($routeParams[$idField]) ? $routeParams[$idField] : $defaultValue; |
|
148 | + $id = (int)!empty($routeParams[$idField]) ? $routeParams[$idField] : $defaultValue; |
|
149 | 149 | } elseif ($request->query->has($idField)) { |
150 | 150 | $id = $request->query->getInt($idField, $defaultValue); |
151 | 151 | } else { |
@@ -157,9 +157,9 @@ discard block |
||
157 | 157 | if (!$id && $idField != 'id' && count($idFields) == 1) { |
158 | 158 | $defaultValue = isset($args['id']) && is_numeric($args['id']) ? $args['id'] : 0; |
159 | 159 | if (array_key_exists('id', $routeParams)) { |
160 | - $id = (int) !empty($routeParams['id']) ? $routeParams['id'] : $defaultValue; |
|
160 | + $id = (int)!empty($routeParams['id']) ? $routeParams['id'] : $defaultValue; |
|
161 | 161 | } elseif ($request->query->has('id')) { |
162 | - $id = (int) $request->query->getInt('id', $defaultValue); |
|
162 | + $id = (int)$request->query->getInt('id', $defaultValue); |
|
163 | 163 | } else { |
164 | 164 | $id = $defaultValue; |
165 | 165 | } |
@@ -56,31 +56,31 @@ |
||
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
59 | - * This method returns a list of possible object states. |
|
60 | - * |
|
61 | - * @return array List of collected state information |
|
62 | - */ |
|
63 | - public function getObjectStates() |
|
64 | - { |
|
65 | - $states = []; |
|
66 | - $states[] = [ |
|
67 | - 'value' => 'initial', |
|
68 | - 'text' => $this->translator->__('Initial'), |
|
69 | - 'ui' => 'danger' |
|
70 | - ]; |
|
71 | - $states[] = [ |
|
72 | - 'value' => 'approved', |
|
73 | - 'text' => $this->translator->__('Approved'), |
|
74 | - 'ui' => 'success' |
|
75 | - ]; |
|
76 | - $states[] = [ |
|
77 | - 'value' => 'deleted', |
|
78 | - 'text' => $this->translator->__('Deleted'), |
|
79 | - 'ui' => 'danger' |
|
80 | - ]; |
|
81 | - |
|
82 | - return $states; |
|
83 | - } |
|
59 | + * This method returns a list of possible object states. |
|
60 | + * |
|
61 | + * @return array List of collected state information |
|
62 | + */ |
|
63 | + public function getObjectStates() |
|
64 | + { |
|
65 | + $states = []; |
|
66 | + $states[] = [ |
|
67 | + 'value' => 'initial', |
|
68 | + 'text' => $this->translator->__('Initial'), |
|
69 | + 'ui' => 'danger' |
|
70 | + ]; |
|
71 | + $states[] = [ |
|
72 | + 'value' => 'approved', |
|
73 | + 'text' => $this->translator->__('Approved'), |
|
74 | + 'ui' => 'success' |
|
75 | + ]; |
|
76 | + $states[] = [ |
|
77 | + 'value' => 'deleted', |
|
78 | + 'text' => $this->translator->__('Deleted'), |
|
79 | + 'ui' => 'danger' |
|
80 | + ]; |
|
81 | + |
|
82 | + return $states; |
|
83 | + } |
|
84 | 84 | |
85 | 85 | /** |
86 | 86 | * This method returns information about a certain state. |