public function addMusic(Music $newMusic) { $newMusic->registerOwner($this); $this->musics[] = $newMusic; }
public function addMusic(Music $music) { if (!in_array($music->getId(), $this->music_ids_list)) { $this->music_ids_list[] = $music->getId(); } }