예제 #1
0
 /**
  * Removes all related methods, if a property was removed
  * @param Tx_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(Tx_ExtensionBuilder_Utility_Inflector::singularize($propertyName)));
         $this->classObject->removeMethod('remove' . ucfirst(Tx_ExtensionBuilder_Utility_Inflector::singularize($propertyName)));
         t3lib_div::devLog('Methods removed: ' . 'add' . ucfirst(Tx_ExtensionBuilder_Utility_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));
     }
     t3lib_div::devLog('Methods removed: ' . 'get' . ucfirst($propertyName), 'extension_builder');
 }