/** * A unidirectional OneToMany association * * @var \Doctrine\Common\Collections\Collection<\Ireien\Course\Domain\Model\Item> * @ORM\ManyToMany * @ORM\JoinTable(inverseJoinColumns={@ORM\JoinColumn(onDelete="CASCADE")}) */
protected $items;
/** * @return void */
public function __construct() {
$this->items = new \Doctrine\Common\Collections\ArrayCollection();
}
/** * @param \Ireien\Course\Domain\Model\Item $item * @return void */
public function addItem(\Ireien\Course\Domain\Model\Item $item) {
$this->items->add($item);
}