main/core/Listener/Tool/ResourcesListener.php
public function onDisplayWorkspace(DisplayToolEvent $event)
    {
        $workspace = $event->getWorkspace();

        $content = $this->templating->render(
            'ClarolineCoreBundle:tool:resources.html.twig', [
                'workspace' => $workspace,
                'context' => [
                    'type' => Widget::CONTEXT_WORKSPACE,
                    'data' => $this->serializer->serialize($workspace),
                ],
                'root' => $this->serializer->serialize(
                    $this->resourceRepository->findWorkspaceRoot($workspace)
                ),
            ]
        );

        $event->setContent($content);
        $event->stopPropagation();
    }
public function onDisplayWorkspace(DisplayToolEvent $event)
    {
        $workspace = $event->getWorkspace();

        $content = $this->templating->render(
            'ClarolineCoreBundle:tool:resources.html.twig', [
                'workspace' => $workspace,
                'context' => [
                    'type' => Widget::CONTEXT_WORKSPACE,
                    'data' => $this->serializer->serialize($workspace),
                ],
                'root' => $this->serializer->serialize(
                    $this->resourceRepository->findWorkspaceRoot($workspace)
                ),
            ]
        );

        $event->setContent($content);
        $event->stopPropagation();
    }
public function onDisplayWorkspace ( DisplayToolEvent $ event ) { $ workspace = $ event -> getWorkspace ( ) ; $ content = $ this -> templating -> render ( 'ClarolineCoreBundle:tool:resources.html.twig' , [ 'workspace' => $ workspace , 'context' => [ 'type' => Widget :: CONTEXT_WORKSPACE , 'data' => $ this -> serializer -> serialize ( $ workspace ) , ] , 'root' => $ this -> serializer -> serialize ( $ this -> resourceRepository -> findWorkspaceRoot ( $ workspace ) ) , ] ) ; $ event -> setContent ( $ content ) ; $ event -> stopPropagation ( ) ; }
Displays resources on Workspace.

@DI\Observe("open_tool_workspace_resource_manager")

@param DisplayToolEvent $event
Displays resources on Workspace .