public function updateUpdateuserId(Lyric $lyric)
 {
     // update only on new lyric
     if ($lyric->getId()) {
         return false;
     }
     // @TODO fix
     $user = $this->securityContext->getToken()->getUser();
     if (!$user instanceof \Tekstove\ApiBundle\Model\User) {
         return false;
     }
     $lyric->setUser($user);
 }
示例#2
0
 /**
  * @param ChildLyric $lyric The ChildLyric object to add.
  */
 protected function doAddLyric(ChildLyric $lyric)
 {
     $this->collLyrics[] = $lyric;
     $lyric->setUser($this);
 }