main/core/Manager/ToolManager.php
public function setToolPosition(
        Tool $tool,
        $position,
        User $user = null,
        Workspace $workspace = null,
        $type = 0
    ) {
        $movingTool = $this->orderedToolRepo->findOneBy(
            ['user' => $user, 'tool' => $tool, 'workspace' => $workspace, 'type' => $type]
        );
        $movingTool->setOrder($position);
        $this->om->persist($movingTool);
        $this->om->flush();
    }
public function setToolPosition(
        Tool $tool,
        $position,
        User $user = null,
        Workspace $workspace = null,
        $type = 0
    ) {
        $movingTool = $this->orderedToolRepo->findOneBy(
            ['user' => $user, 'tool' => $tool, 'workspace' => $workspace, 'type' => $type]
        );
        $movingTool->setOrder($position);
        $this->om->persist($movingTool);
        $this->om->flush();
    }
public function setToolPosition ( Tool $ tool , $ position , User $ user = null , Workspace $ workspace = null , $ type = 0 ) { $ movingTool = $ this -> orderedToolRepo -> findOneBy ( [ 'user' => $ user , 'tool' => $ tool , 'workspace' => $ workspace , 'type' => $ type ] ) ; $ movingTool -> setOrder ( $ position ) ; $ this -> om -> persist ( $ movingTool ) ; $ this -> om -> flush ( ) ; }
Sets a tool position.

@param Tool      $tool
@param           $position
@param User      $user
@param Workspace $workspace
Sets a tool position .