public function __construct($type = null) { $this->authors = new ArrayCollection(); $this->type = $type; }