public function getCollectionAction($start, MediaFolder $parent = null)
    {
        $mediaFolders = [];

        $results = $this->getMediaFolderRepository()->getMediaFolders($parent, [
            'field' => '_leftnode',
            'dir'   => 'asc',
        ]);

        foreach ($results as $folder) {

            if($this->isGranted('VIEW', $folder) || true === $folder->isRoot()){

                $mediaFolders[] = $folder;
            }
        }

        return $this->addRangeToContent($this->createJsonResponse($mediaFolders), $mediaFolders, $start);
    }