plugin/lesson/Controller/API/ChapterController.php
public function getTreeAction(Lesson $lesson)
    {
        $this->checkPermission('OPEN', $lesson->getResourceNode(), [], true);

        return new JsonResponse($this->chapterManager->serializeChapterTree($lesson));
    }
public function getTreeAction(Lesson $lesson)
    {
        $this->checkPermission('OPEN', $lesson->getResourceNode(), [], true);

        return new JsonResponse($this->chapterManager->serializeChapterTree($lesson));
    }
public function getTreeAction ( Lesson $ lesson ) { $ this -> checkPermission ( 'OPEN' , $ lesson -> getResourceNode ( ) , [ ] , true ) ; return new JsonResponse ( $ this -> chapterManager -> serializeChapterTree ( $ lesson ) ) ; }
Get chapter tree.

@EXT\Route("/tree", name="apiv2_lesson_tree_get")
@EXT\Method("GET")

@param Lesson $lesson

@return JsonResponse
Get chapter tree .