public function setParentRoles(array $parentRoles) { $this->parentRoles = []; foreach ($parentRoles as $parentRole) { $this->addParentRole($parentRole); } }