main/core/Manager/ToolManager.php
public function resetToolsVisiblity(
        User $user = null,
        Workspace $workspace = null,
        $type = 0
    ) {
        $orderedTools = $this->orderedToolRepo->findBy(
            ['user' => $user, 'workspace' => $workspace, 'type' => $type]
        );

        foreach ($orderedTools as $orderedTool) {
            if ($user) {
                $orderedTool->setVisibleInDesktop(false);
            }

            $this->om->persist($orderedTool);
        }

        $this->om->flush();
    }
public function resetToolsVisiblity(
        User $user = null,
        Workspace $workspace = null,
        $type = 0
    ) {
        $orderedTools = $this->orderedToolRepo->findBy(
            ['user' => $user, 'workspace' => $workspace, 'type' => $type]
        );

        foreach ($orderedTools as $orderedTool) {
            if ($user) {
                $orderedTool->setVisibleInDesktop(false);
            }

            $this->om->persist($orderedTool);
        }

        $this->om->flush();
    }
public function resetToolsVisiblity ( User $ user = null , Workspace $ workspace = null , $ type = 0 ) { $ orderedTools = $ this -> orderedToolRepo -> findBy ( [ 'user' => $ user , 'workspace' => $ workspace , 'type' => $ type ] ) ; foreach ( $ orderedTools as $ orderedTool ) { if ( $ user ) { $ orderedTool -> setVisibleInDesktop ( false ) ; } $ this -> om -> persist ( $ orderedTool ) ; } $ this -> om -> flush ( ) ; }
Resets the tool visibility.

@param User      $user
@param Workspace $workspace
Resets the tool visibility .