main/core/Manager/ToolManager.php
public function getDesktopToolsConfigurationArray(User $user, $type = 0)
    {
        $orderedToolList = [];
        $desktopTools = $this->orderedToolRepo->findDisplayableDesktopOrderedToolsByUser(
            $user,
            $type
        );

        foreach ($desktopTools as $desktopTool) {
            //this field isn't mapped
            $desktopTool->getTool()->setVisible($desktopTool->isVisibleInDesktop());
            $orderedToolList[$desktopTool->getOrder()] = $desktopTool->getTool();
        }

        $undisplayedTools = $this->toolRepo->findDesktopUndisplayedToolsByUser($user, $type);

        foreach ($undisplayedTools as $tool) {
            //this field isn't mapped
            $tool->setVisible(false);
        }

        $this->addMissingDesktopTools(
            $user,
            $undisplayedTools,
            count($desktopTools) + 1,
            $type
        );

        return $this->utilities->arrayFill($orderedToolList, $undisplayedTools);
    }
public function getDesktopToolsConfigurationArray(User $user, $type = 0)
    {
        $orderedToolList = [];
        $desktopTools = $this->orderedToolRepo->findDisplayableDesktopOrderedToolsByUser(
            $user,
            $type
        );

        foreach ($desktopTools as $desktopTool) {
            //this field isn't mapped
            $desktopTool->getTool()->setVisible($desktopTool->isVisibleInDesktop());
            $orderedToolList[$desktopTool->getOrder()] = $desktopTool->getTool();
        }

        $undisplayedTools = $this->toolRepo->findDesktopUndisplayedToolsByUser($user, $type);

        foreach ($undisplayedTools as $tool) {
            //this field isn't mapped
            $tool->setVisible(false);
        }

        $this->addMissingDesktopTools(
            $user,
            $undisplayedTools,
            count($desktopTools) + 1,
            $type
        );

        return $this->utilities->arrayFill($orderedToolList, $undisplayedTools);
    }
public function getDesktopToolsConfigurationArray ( User $ user , $ type = 0 ) { $ orderedToolList = [ ] ; $ desktopTools = $ this -> orderedToolRepo -> findDisplayableDesktopOrderedToolsByUser ( $ user , $ type ) ; foreach ( $ desktopTools as $ desktopTool ) { //this field isn't mapped $ desktopTool -> getTool ( ) -> setVisible ( $ desktopTool -> isVisibleInDesktop ( ) ) ; $ orderedToolList [ $ desktopTool -> getOrder ( ) ] = $ desktopTool -> getTool ( ) ; } $ undisplayedTools = $ this -> toolRepo -> findDesktopUndisplayedToolsByUser ( $ user , $ type ) ; foreach ( $ undisplayedTools as $ tool ) { //this field isn't mapped $ tool -> setVisible ( false ) ; } $ this -> addMissingDesktopTools ( $ user , $ undisplayedTools , count ( $ desktopTools ) + 1 , $ type ) ; return $ this -> utilities -> arrayFill ( $ orderedToolList , $ undisplayedTools ) ; }
Returns the sorted list of OrderedTools for a user.

@param \Claroline\CoreBundle\Entity\User $user

@return \Claroline\CoreBundle\Entity\Tool\OrderedTool
Returns the sorted list of OrderedTools for a user .