/** * Removes all related methods, if a property was removed * @param \EBT\ExtensionBuilder\Domain\Model\DomainObject\AbstractProperty $propertyToRemove * * @return void */ protected function removePropertyAndRelatedMethods($propertyToRemove) { $propertyName = $propertyToRemove->getName(); $this->classObject->removeProperty($propertyName); if ($propertyToRemove->isAnyToManyRelation()) { $this->classObject->removeMethod('add' . ucfirst(Inflector::singularize($propertyName))); $this->classObject->removeMethod('remove' . ucfirst(Inflector::singularize($propertyName))); GeneralUtility::devLog('Methods removed: ' . 'add' . ucfirst(Inflector::singularize($propertyName)), 'extension_builder'); } $this->classObject->removeMethod('get' . ucfirst($propertyName)); $this->classObject->removeMethod('set' . ucfirst($propertyName)); if ($propertyToRemove->isBoolean()) { $this->classObject->removeMethod('is' . ucfirst($propertyName)); } GeneralUtility::devLog('Methods removed: ' . 'get' . ucfirst($propertyName), 'extension_builder'); }