main/core/Listener/Administration/WorkspaceListener.php
public function onDisplayTool(OpenAdministrationToolEvent $event)
    {
        $workspaceTools = $this->toolManager->getAvailableWorkspaceTools();

        $content = $this->templating->render(
            'ClarolineCoreBundle:administration:workspaces.html.twig',
            [
                'parameters' => $this->parametersSerializer->serialize(),
                'tools' => array_map(function (Tool $tool) {
                    return ['name' => $tool->getName()];
                }, $workspaceTools),
                'models' => $this->finder->search(
                    Workspace::class,
                    ['filters' => ['model' => true]],
                    [Options::SERIALIZE_MINIMAL]
                ),
            ]
        );

        $event->setResponse(new Response($content));
        $event->stopPropagation();
    }
public function onDisplayTool(OpenAdministrationToolEvent $event)
    {
        $workspaceTools = $this->toolManager->getAvailableWorkspaceTools();

        $content = $this->templating->render(
            'ClarolineCoreBundle:administration:workspaces.html.twig',
            [
                'parameters' => $this->parametersSerializer->serialize(),
                'tools' => array_map(function (Tool $tool) {
                    return ['name' => $tool->getName()];
                }, $workspaceTools),
                'models' => $this->finder->search(
                    Workspace::class,
                    ['filters' => ['model' => true]],
                    [Options::SERIALIZE_MINIMAL]
                ),
            ]
        );

        $event->setResponse(new Response($content));
        $event->stopPropagation();
    }
public function onDisplayTool ( OpenAdministrationToolEvent $ event ) { $ workspaceTools = $ this -> toolManager -> getAvailableWorkspaceTools ( ) ; $ content = $ this -> templating -> render ( 'ClarolineCoreBundle:administration:workspaces.html.twig' , [ 'parameters' => $ this -> parametersSerializer -> serialize ( ) , 'tools' => array_map ( function ( Tool $ tool ) { return [ 'name' => $ tool -> getName ( ) ] ; } , $ workspaceTools ) , 'models' => $ this -> finder -> search ( Workspace :: class , [ 'filters' => [ 'model' => true ] ] , [ Options :: SERIALIZE_MINIMAL ] ) , ] ) ; $ event -> setResponse ( new Response ( $ content ) ) ; $ event -> stopPropagation ( ) ; }
Displays workspace administration tool.

@DI\Observe("administration_tool_workspace_management")

@param OpenAdministrationToolEvent $event
Displays workspace administration tool .