public function addFavourite(Workspace $workspace, User $user)
    {
        $favourite = new WorkspaceFavourite();
        $favourite->setWorkspace($workspace);
        $favourite->setUser($user);

        $this->om->persist($favourite);
        $this->om->flush();
    }
public function addFavourite(Workspace $workspace, User $user)
    {
        $favourite = new WorkspaceFavourite();
        $favourite->setWorkspace($workspace);
        $favourite->setUser($user);

        $this->om->persist($favourite);
        $this->om->flush();
    }
public function addFavourite ( Workspace $ workspace , User $ user ) { $ favourite = new WorkspaceFavourite ( ) ; $ favourite -> setWorkspace ( $ workspace ) ; $ favourite -> setUser ( $ user ) ; $ this -> om -> persist ( $ favourite ) ; $ this -> om -> flush ( ) ; }
Adds a favourite workspace.

@param Workspace $workspace
@param User      $user
Adds a favourite workspace .