main/core/Listener/Administration/HomeListener.php
public function onDisplayTool(OpenAdministrationToolEvent $event)
    {
        $tabs = $this->finder->search(
          HomeTab::class,
          ['filters' => ['type' => HomeTab::TYPE_ADMIN_DESKTOP]]
        );

        $tabs = array_filter($tabs['data'], function ($data) {
            return $data !== [];
        });

        foreach ($tabs as $tab) {
            $orderedTabs[$tab['position']] = $tab;
        }
        ksort($orderedTabs);

        $roles = $this->finder->search('Claroline\CoreBundle\Entity\Role',
          ['filters' => ['type' => Role::PLATFORM_ROLE]]
        );

        $content = $this->templating->render(
            'ClarolineCoreBundle:administration:home.html.twig', [
                'editable' => true,
                'administration' => true,
                'context' => [
                    'type' => Widget::CONTEXT_DESKTOP,
                    'data' => [
                        'roles' => $roles['data'],
                    ],
                ],
                'tabs' => array_values($orderedTabs),
            ]
        );
        $event->setResponse(new Response($content));
        $event->stopPropagation();
    }
public function onDisplayTool(OpenAdministrationToolEvent $event)
    {
        $tabs = $this->finder->search(
          HomeTab::class,
          ['filters' => ['type' => HomeTab::TYPE_ADMIN_DESKTOP]]
        );

        $tabs = array_filter($tabs['data'], function ($data) {
            return $data !== [];
        });

        foreach ($tabs as $tab) {
            $orderedTabs[$tab['position']] = $tab;
        }
        ksort($orderedTabs);

        $roles = $this->finder->search('Claroline\CoreBundle\Entity\Role',
          ['filters' => ['type' => Role::PLATFORM_ROLE]]
        );

        $content = $this->templating->render(
            'ClarolineCoreBundle:administration:home.html.twig', [
                'editable' => true,
                'administration' => true,
                'context' => [
                    'type' => Widget::CONTEXT_DESKTOP,
                    'data' => [
                        'roles' => $roles['data'],
                    ],
                ],
                'tabs' => array_values($orderedTabs),
            ]
        );
        $event->setResponse(new Response($content));
        $event->stopPropagation();
    }
public function onDisplayTool ( OpenAdministrationToolEvent $ event ) { $ tabs = $ this -> finder -> search ( HomeTab :: class , [ 'filters' => [ 'type' => HomeTab :: TYPE_ADMIN_DESKTOP ] ] ) ; $ tabs = array_filter ( $ tabs [ 'data' ] , function ( $ data ) { return $ data !== [ ] ; } ) ; foreach ( $ tabs as $ tab ) { $ orderedTabs [ $ tab [ 'position' ] ] = $ tab ; } ksort ( $ orderedTabs ) ; $ roles = $ this -> finder -> search ( 'Claroline\CoreBundle\Entity\Role' , [ 'filters' => [ 'type' => Role :: PLATFORM_ROLE ] ] ) ; $ content = $ this -> templating -> render ( 'ClarolineCoreBundle:administration:home.html.twig' , [ 'editable' => true , 'administration' => true , 'context' => [ 'type' => Widget :: CONTEXT_DESKTOP , 'data' => [ 'roles' => $ roles [ 'data' ] , ] , ] , 'tabs' => array_values ( $ orderedTabs ) , ] ) ; $ event -> setResponse ( new Response ( $ content ) ) ; $ event -> stopPropagation ( ) ; }
Displays analytics administration tool.

@DI\Observe("administration_tool_desktop_and_home")

@param OpenAdministrationToolEvent $event
Displays analytics administration tool .