public function onDisplayWorkspace(DisplayToolEvent $event)
    {
        $levelMax = 1;
        $workspace = $event->getWorkspace();
        $authenticatedUser = $this->tokenStorage->getToken()->getUser();
        $user = 'anon.' !== $authenticatedUser ? $authenticatedUser : null;
        $items = $this->progressionManager->fetchItems($workspace, $user, $levelMax);

        $content = $this->templating->render(
            'ClarolineCoreBundle:tool:progression.html.twig', [
                'workspace' => $workspace,
                'context' => [
                    'type' => 'workspace',
                    'data' => $this->serializer->serialize($workspace),
                ],
                'items' => $items,
                'levelMax' => null,    // how deep to process children recursively
            ]
        );

        $event->setContent($content);
        $event->stopPropagation();
    }
public function onDisplayWorkspace(DisplayToolEvent $event)
    {
        $levelMax = 1;
        $workspace = $event->getWorkspace();
        $authenticatedUser = $this->tokenStorage->getToken()->getUser();
        $user = 'anon.' !== $authenticatedUser ? $authenticatedUser : null;
        $items = $this->progressionManager->fetchItems($workspace, $user, $levelMax);

        $content = $this->templating->render(
            'ClarolineCoreBundle:tool:progression.html.twig', [
                'workspace' => $workspace,
                'context' => [
                    'type' => 'workspace',
                    'data' => $this->serializer->serialize($workspace),
                ],
                'items' => $items,
                'levelMax' => null,    // how deep to process children recursively
            ]
        );

        $event->setContent($content);
        $event->stopPropagation();
    }
public function onDisplayWorkspace ( DisplayToolEvent $ event ) { $ levelMax = 1 ; $ workspace = $ event -> getWorkspace ( ) ; $ authenticatedUser = $ this -> tokenStorage -> getToken ( ) -> getUser ( ) ; $ user = 'anon.' !== $ authenticatedUser ? $ authenticatedUser : null ; $ items = $ this -> progressionManager -> fetchItems ( $ workspace , $ user , $ levelMax ) ; $ content = $ this -> templating -> render ( 'ClarolineCoreBundle:tool:progression.html.twig' , [ 'workspace' => $ workspace , 'context' => [ 'type' => 'workspace' , 'data' => $ this -> serializer -> serialize ( $ workspace ) , ] , 'items' => $ items , 'levelMax' => null , // how deep to process children recursively ] ) ; $ event -> setContent ( $ content ) ; $ event -> stopPropagation ( ) ; }
Displays workspace progression tool.

@DI\Observe("open_tool_workspace_progression")

@param DisplayToolEvent $event
Displays workspace progression tool .