@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | /** |
| 48 | 48 | * Displays a form to edit an existing item entity. |
| 49 | 49 | * |
| 50 | - * @param Object $entity Entity |
|
| 50 | + * @param Orders $entity Entity |
|
| 51 | 51 | * @param string $prefixRoute Prefix of Route |
| 52 | 52 | * @param string $typePath Path of FormType |
| 53 | 53 | * @return array |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | /** |
| 70 | 70 | * Edits an existing item entity. |
| 71 | 71 | * |
| 72 | - * @param Object $entity Entity |
|
| 72 | + * @param Orders $entity Entity |
|
| 73 | 73 | * @param \Symfony\Component\HttpFoundation\Request $request Request in progress |
| 74 | 74 | * @param string $prefixRoute Prefix of Route |
| 75 | 75 | * @param string $typePath Path of FormType |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | /** |
| 62 | 62 | * Get Users |
| 63 | 63 | * |
| 64 | - * @return AppBundle\Entity\Staff\User |
|
| 64 | + * @return User[] |
|
| 65 | 65 | */ |
| 66 | 66 | public function getUsers() |
| 67 | 67 | { |
@@ -235,7 +235,7 @@ |
||
| 235 | 235 | * @param string $entityName Name of Entity |
| 236 | 236 | * @param string $prefixRoute Prefix of Route |
| 237 | 237 | * |
| 238 | - * @return array |
|
| 238 | + * @return \Symfony\Component\HttpFoundation\RedirectResponse |
|
| 239 | 239 | */ |
| 240 | 240 | public function abstractDeleteWithArticlesAction($entity, Request $request, $entityName, $prefixRoute) |
| 241 | 241 | { |
@@ -373,15 +373,15 @@ |
||
| 373 | 373 | { |
| 374 | 374 | $roles = ['ROLE_ADMIN', 'ROLE_SUPER_ADMIN']; |
| 375 | 375 | switch ($entityName) { |
| 376 | - case 'Settings\Diverse\FamilyLog': |
|
| 377 | - $entities = $etm->getRepository('AppBundle:'.$entityName)->childrenHierarchy(); |
|
| 378 | - break; |
|
| 379 | - default: |
|
| 380 | - if ($this->getUser() !== null && in_array($this->getUser()->getRoles()[0], $roles)) { |
|
| 381 | - $entities = $etm->getRepository('AppBundle:'.$entityName)->getAllItems(); |
|
| 382 | - } else { |
|
| 383 | - $entities = $etm->getRepository('AppBundle:'.$entityName)->getItems(); |
|
| 384 | - } |
|
| 376 | + case 'Settings\Diverse\FamilyLog': |
|
| 377 | + $entities = $etm->getRepository('AppBundle:'.$entityName)->childrenHierarchy(); |
|
| 378 | + break; |
|
| 379 | + default: |
|
| 380 | + if ($this->getUser() !== null && in_array($this->getUser()->getRoles()[0], $roles)) { |
|
| 381 | + $entities = $etm->getRepository('AppBundle:'.$entityName)->getAllItems(); |
|
| 382 | + } else { |
|
| 383 | + $entities = $etm->getRepository('AppBundle:'.$entityName)->getItems(); |
|
| 384 | + } |
|
| 385 | 385 | } |
| 386 | 386 | return $entities; |
| 387 | 387 | } |