コード例 #1
0
ファイル: Post.php プロジェクト: noose/Planeta
 public function addTag($tag)
 {
     if ($tag) {
         $pt = new PostTag();
         $pt->setTag($tag);
         $this->addPostTag($pt);
         return true;
     }
     return false;
 }
コード例 #2
0
ファイル: BaseTag.php プロジェクト: noose/Planeta
 /**
  * Method called to associate a PostTag object to this object
  * through the PostTag foreign key attribute
  *
  * @param      PostTag $l PostTag
  * @return     void
  * @throws     PropelException
  */
 public function addPostTag(PostTag $l)
 {
     $this->collPostTags[] = $l;
     $l->setTag($this);
 }