CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.6 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Bug #5856

Model objects with space in the name

Added by Laurent Foulloy over 3 years ago. Updated over 2 years ago.

Status:Resolved Start date:2009-12-29
Priority:Should have Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
Votes: 0

Description

When a model object has one or more space in its name, it is processed as it.

My proposal would be to replace each space by an underscore in Tx_ExtbaseKickstarter_Domain_Model_DomainObject::setName()
and add a call to Tx_Extbase_Utility_Extension::convertLowerUnderscoreToUpperCamelCase() in Tx_ExtbaseKickstarter_Service_CodeGenerator in the generation of the domain model file.


Related issues

related to Extension Builder - Bug #5694: Invalid classnames in Domain model Resolved 2009-12-09

History

Updated by Georg Grossberger about 3 years ago

I can confirm this. Tried to create a model, name it "Index Entry" and the generated file was "Domain/Model/Index Entry.php", containing a class named "...Domain_Model_Index Entry".
Of course, the same applies to class members as well.

Since the given name is used as the BE label, it should be possible to write it with white spaces, which are removed in the generated code. I know those labels should be written in CamelCase and the humanize view helper puts in some spaces, but that's not very intuitive.

One solution would be to check in the setName properties in Tx_ExtbaseKickstarter_Domain_Model_DomainObject and Tx_ExtbaseKickstarter_Domain_Model_AbstractProperty for white spaces and remove them accordingly
eg: make "My important Class member", "MyImportantClassMember" and the humanize view helper takes care of the rest.

Updated by Sebastian Michaelsen over 2 years ago

  • Status changed from Needs Feedback to Resolved

Also available in: Atom PDF