public function copyFromCode(Workspace $workspace, $code)
    {
        if ($this->logger) {
            $this->container->get('claroline.api.serializer')->setLogger($this->logger);
        }

        $newWorkspace = new Workspace();
        $newWorkspace->setCode($code);
        $newWorkspace->setName($code);
        $this->copy($workspace, $newWorkspace);
        //override code & name

        return $newWorkspace;
    }
public function copyFromCode(Workspace $workspace, $code)
    {
        if ($this->logger) {
            $this->container->get('claroline.api.serializer')->setLogger($this->logger);
        }

        $newWorkspace = new Workspace();
        $newWorkspace->setCode($code);
        $newWorkspace->setName($code);
        $this->copy($workspace, $newWorkspace);
        //override code & name

        return $newWorkspace;
    }
public function copyFromCode ( Workspace $ workspace , $ code ) { if ( $ this -> logger ) { $ this -> container -> get ( 'claroline.api.serializer' ) -> setLogger ( $ this -> logger ) ; } $ newWorkspace = new Workspace ( ) ; $ newWorkspace -> setCode ( $ code ) ; $ newWorkspace -> setName ( $ code ) ; $ this -> copy ( $ workspace , $ newWorkspace ) ; //override code & name return $ newWorkspace ; }
used for cli copy debug tool
used for cli copy debug tool