コード例 #1
0
ファイル: Project.php プロジェクト: jackbravo/symfony-sandbox
 /**
  * Method used by ModifyProjectForm
  */
 public function getNewNote()
 {
     if (!$this->notes->last() || $this->notes->last()->getId()) {
         return '';
     } else {
         return $this->notes->last()->getNote();
     }
 }
コード例 #2
0
ファイル: Project.php プロジェクト: jackbravo/symfony-sandbox
 /**
  * Add notes
  *
  * @param Application\ChiaBundle\Entity\Note $note
  */
 public function addNotes(\Application\ChiaBundle\Entity\Note $note)
 {
     $note->setProject($this);
     $this->notes[] = $note;
 }
コード例 #3
0
ファイル: User.php プロジェクト: jackbravo/symfony-sandbox
 /**
  * Add notes
  *
  * @param Application\ChiaBundle\Entity\Note $notes
  */
 public function addNotes(\Application\ChiaBundle\Entity\Note $notes)
 {
     $notes->setCreatedBy($this);
     $this->notes[] = $notes;
 }