/**
  * @Route("/playlists", name="audio-player.playlist.get.all")
  * @Method({"GET"})
  * @return JsonResponse
  */
 public function getPlaylists()
 {
     /** @var EntityManager $em */
     $em = $this->getDoctrine()->getManager();
     /** @var User $user */
     $user = $em->getRepository('riki34BackendBundle:User')->findOneBy(['username' => 'test']);
     return new JsonResponse(JsonTransformer::arrayToMinJson($user->getPlaylists()), 200);
 }
 public function getFullInArray()
 {
     return ['id' => $this->id, 'name' => $this->name, 'parentID' => $this->parentId, 'path' => $this->getFullPath(), 'userID' => $this->userId, 'subdirs' => JsonTransformer::arrayToMinJson($this->getSubdirs()), 'files' => JsonTransformer::arrayToFullJson($this->getFiles()), 'created' => $this->created->format(\DateTime::ISO8601), 'updated' => $this->updated->format(\DateTime::ISO8601)];
 }
 public function getFullInArray()
 {
     return ['id' => $this->getId(), 'userID' => $this->getUserId(), 'title' => $this->getTitle(), 'trackCount' => $this->getTracks()->count(), 'tracks' => JsonTransformer::arrayToFullJson($this->getTracks())];
 }