public function setLocale(User $user, $locale)
    {
        $user->getContact()->setLocale($locale);

        $this->dm->persist($user);
        $this->dm->flush();

        return $this;
    }
public function setLocale(User $user, $locale)
    {
        $user->getContact()->setLocale($locale);

        $this->dm->persist($user);
        $this->dm->flush();

        return $this;
    }
public function setLocale ( User $ user , $ locale ) { $ user -> getContact ( ) -> setLocale ( $ locale ) ; $ this -> dm -> persist ( $ user ) ; $ this -> dm -> flush ( ) ; return $ this ; }
Set locale for an user

@param User $user

@param $locale
@return $this
Set locale for an user