| 
				
			 | 
			
			
				@@ -25,9 +25,9 @@ class ShowController extends Controller 
			 | 
		
	
		
			
			| 
				25
			 | 
			
				25
			 | 
			
			
				         throw $this->createNotFoundException('Utilisateur introuvable.'); 
			 | 
		
	
		
			
			| 
				26
			 | 
			
				26
			 | 
			
			
				     } 
			 | 
		
	
		
			
			| 
				27
			 | 
			
				27
			 | 
			
			
				      
			 | 
		
	
		
			
			| 
				28
			 | 
			
				
			 | 
			
			
				-     
			 | 
		
	
		
			
			| 
				29
			 | 
			
				28
			 | 
			
			
				     return array( 
			 | 
		
	
		
			
			| 
				30
			 | 
			
				
			 | 
			
			
				-      'viewed_user' => $viewed_user 
			 | 
		
	
		
			
			| 
				
			 | 
			
				29
			 | 
			
			
				+      'viewed_user' => $viewed_user, 
			 | 
		
	
		
			
			| 
				
			 | 
			
				30
			 | 
			
			
				+      'elements' => $this->getShowedEntityElements($viewed_user->getId(), 'User') 
			 | 
		
	
		
			
			| 
				31
			 | 
			
				31
			 | 
			
			
				     ); 
			 | 
		
	
		
			
			| 
				32
			 | 
			
				32
			 | 
			
			
				   } 
			 | 
		
	
		
			
			| 
				33
			 | 
			
				33
			 | 
			
			
				    
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -48,15 +48,26 @@ class ShowController extends Controller 
			 | 
		
	
		
			
			| 
				48
			 | 
			
				48
			 | 
			
			
				         throw $this->createNotFoundException('Groupe introuvable.'); 
			 | 
		
	
		
			
			| 
				49
			 | 
			
				49
			 | 
			
			
				     } 
			 | 
		
	
		
			
			| 
				50
			 | 
			
				50
			 | 
			
			
				      
			 | 
		
	
		
			
			| 
				51
			 | 
			
				
			 | 
			
			
				-     
			 | 
		
	
		
			
			| 
				52
			 | 
			
				51
			 | 
			
			
				     return array( 
			 | 
		
	
		
			
			| 
				53
			 | 
			
				
			 | 
			
			
				-      'group' => $group 
			 | 
		
	
		
			
			| 
				
			 | 
			
				52
			 | 
			
			
				+      'group' => $group, 
			 | 
		
	
		
			
			| 
				
			 | 
			
				53
			 | 
			
			
				+      'elements' => $this->getShowedEntityElements($group->getId(), 'Group') 
			 | 
		
	
		
			
			| 
				54
			 | 
			
				54
			 | 
			
			
				     ); 
			 | 
		
	
		
			
			| 
				55
			 | 
			
				55
			 | 
			
			
				   } 
			 | 
		
	
		
			
			| 
				56
			 | 
			
				56
			 | 
			
			
				    
			 | 
		
	
		
			
			| 
				57
			 | 
			
				
			 | 
			
			
				-  protected function getShowedEntityElements() 
			 | 
		
	
		
			
			| 
				
			 | 
			
				57
			 | 
			
			
				+  /** 
			 | 
		
	
		
			
			| 
				
			 | 
			
				58
			 | 
			
			
				+   * 
			 | 
		
	
		
			
			| 
				
			 | 
			
				59
			 | 
			
			
				+   * @param Entity $entity 
			 | 
		
	
		
			
			| 
				
			 | 
			
				60
			 | 
			
			
				+   * @param string $type 
			 | 
		
	
		
			
			| 
				
			 | 
			
				61
			 | 
			
			
				+   * @return array  
			 | 
		
	
		
			
			| 
				
			 | 
			
				62
			 | 
			
			
				+   */ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				63
			 | 
			
			
				+  protected function getShowedEntityElements($entity_id, $type) 
			 | 
		
	
		
			
			| 
				58
			 | 
			
				64
			 | 
			
			
				   { 
			 | 
		
	
		
			
			| 
				59
			 | 
			
				
			 | 
			
			
				-     
			 | 
		
	
		
			
			| 
				
			 | 
			
				65
			 | 
			
			
				+    $findBy = 'findBy'.$type; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				66
			 | 
			
			
				+    return $this->getDoctrine() 
			 | 
		
	
		
			
			| 
				
			 | 
			
				67
			 | 
			
			
				+      ->getRepository('MuzichCoreBundle:Element') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				68
			 | 
			
			
				+      ->$findBy($entity_id, 10) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				69
			 | 
			
			
				+      ->execute() 
			 | 
		
	
		
			
			| 
				
			 | 
			
				70
			 | 
			
			
				+    ; 
			 | 
		
	
		
			
			| 
				60
			 | 
			
				71
			 | 
			
			
				   } 
			 | 
		
	
		
			
			| 
				61
			 | 
			
				72
			 | 
			
			
				    
			 | 
		
	
		
			
			| 
				62
			 | 
			
				73
			 | 
			
			
				 } 
			 |