@@ -257,7 +257,7 @@ |
||
257 | 257 | * @param Object $entity Entity |
258 | 258 | * @param Request $request Request in progress |
259 | 259 | * @param string $entityName Name of Entity |
260 | - * @return array |
|
260 | + * @return \Symfony\Component\HttpFoundation\RedirectResponse |
|
261 | 261 | */ |
262 | 262 | public function abstractDeleteWithArticlesAction($entity, Request $request, $entityName) |
263 | 263 | { |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | $this->addRolesAction($form, $entityNew); |
154 | 154 | } |
155 | 155 | $form->handleRequest($request); |
156 | - $return = [$entity => $entityNew, 'form' => $form->createView(),]; |
|
156 | + $return = [$entity => $entityNew, 'form' => $form->createView(), ]; |
|
157 | 157 | |
158 | 158 | if ($form->isValid()) { |
159 | 159 | $etm = $this->getDoctrine()->getManager(); |
@@ -262,9 +262,9 @@ discard block |
||
262 | 262 | public function abstractDeleteWithArticlesAction($entity, Request $request, $entityName) |
263 | 263 | { |
264 | 264 | $etm = $this->getDoctrine()->getManager(); |
265 | - $form = $this->createDeleteForm($entity->getId(), $entityName . '_delete'); |
|
265 | + $form = $this->createDeleteForm($entity->getId(), $entityName.'_delete'); |
|
266 | 266 | $entityArticles = $etm |
267 | - ->getRepository('AppBundle:' . ucfirst($entityName) . 'Articles') |
|
267 | + ->getRepository('AppBundle:'.ucfirst($entityName).'Articles') |
|
268 | 268 | ->findBy([$entityName => $entity->getId()]); |
269 | 269 | |
270 | 270 | if ($form->handleRequest($request)->isValid()) { |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | } else { |
300 | 300 | $alias = current($qbd->getDQLPart('from'))->getAlias(); |
301 | 301 | } |
302 | - $qbd->orderBy($alias . '.' . $order['field'], $order['type']); |
|
302 | + $qbd->orderBy($alias.'.'.$order['field'], $order['type']); |
|
303 | 303 | } |
304 | 304 | } |
305 | 305 |
@@ -114,6 +114,6 @@ |
||
114 | 114 | { |
115 | 115 | $session = new Session(); |
116 | 116 | |
117 | - return $session->has('sort.' . $name) ? $session->get('sort.' . $name) : null; |
|
117 | + return $session->has('sort.'.$name) ? $session->get('sort.'.$name) : null; |
|
118 | 118 | } |
119 | 119 | } |