Guest User

Untitled

a guest
Jan 9th, 2019
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. foreach ($comments as &$comment) {
  2. $subcomments = $commentRepo->getSubComments($comment->getId());
  3. $comment->subComments = $subcomments;
  4. }
  5.  
  6. $response = [
  7. 'comments' => $comments,
  8. 'id' => $id,
  9. 'totalPages' => $totalPages
  10. ];
  11.  
  12. return new JsonResponse($response);
  13.  
  14. ArticleController.php on line 194:
  15. array:3 [
  16. "comments" => array:1 [
  17. 0 => & Comment {#7263
  18. -id: 168
  19. -content: "Лошо е"
  20. -person: User {#5420
  21. #id: 3
  22. -firstName: "testtt"
  23. -favouriteArticles: PersistentCollection {#5653
  24. -snapshot: []
  25. -owner: User {#5420}
  26. -association: array:19 [ …19]
  27. -em: EntityManager {#3456 …11}
  28. -backRefFieldName: null
  29. -typeClass: ClassMetadata {#5424 …}
  30. -isDirty: false
  31. #collection: ArrayCollection {#5688
  32. -elements: []
  33. }
  34. #initialized: true
  35. }
  36. #username: "test@test.com"
  37. #usernameCanonical: "test@test.com"
  38. #email: "test@test.com"
  39. #emailCanonical: "test@test.com"
  40. #enabled: true
  41. #salt: null
  42. #password: "$2y$13$.8Ky5Jj71PUsGD9E04nre./xClPVZ/Uiia40PTQjGmMAqOFpW2mwi"
  43. #plainPassword: null
  44. #lastLogin: DateTime {#5416
  45. +"date": "2019-01-07 09:39:06.000000"
  46. +"timezone_type": 3
  47. +"timezone": "UTC"
  48. }
  49. #confirmationToken: null
  50. #passwordRequestedAt: null
  51. #groups: null
  52. #roles: []
  53. }
  54. -dateAdded: DateTime {#7260
  55. +"date": "2019-01-09 11:02:35.000000"
  56. +"timezone_type": 3
  57. +"timezone": "UTC"
  58. }
  59. -replyTo: 0
  60. -postId: 8
  61. +"subComments": []
  62. }
  63. ]
  64. "id" => "8"
  65. "totalPages" => 2.0
  66. ]
Add Comment
Please, Sign In to add comment