public function addLicense(LicenseEntity $licenseEntity) { $licenseEntity->getHookedObjects()->add($this); $this->licenses->add($licenseEntity); }