public function setNote(Note $note = null) { $this->slideNote = is_null($note) ? new Note() : $note; $this->slideNote->setParent($this); return $this; }