[TYPO3-core] RFC: #15094: Refactor of content objects of tslib_content

Ingo Renner ingo at typo3.org
Mon Jul 19 10:42:08 CEST 2010


Steffen Kamper wrote:

Hi Steffen and all,

> Create class with following name scheme:
> class tslib_content_my_ce extends tslib_content_abstract (use lower case
> only)

I think this is a great improvement, but I'm sorry to having spoil the 
party. There are severe issues with the naming of classes in this patch, 
according to class naming guidelines the classes must be named as 
follows: 
lowercase_namespace_devided_by_underscore_UpperCamelCaseClassNameWithNoUnderscore

tslib_content_Abstract

tslib_content_Case
tslib_content_ClearGif
tslib_content_Coa
tslib_content_CoaInt
tslib_content_Columns
tslib_content_Content
tslib_content_Ctable
tslib_content_File
tslib_content_Form
tslib_content_Hmenu / tslib_content_HMenu / tslib_content_HorizontalMenu 
(cleaned up name)
tslib_content_Hruler / tslib_content_HRuler / 
tslib_content_HorizontalRuler (cleaned up name)
tslib_content_Html
tslib_content_Image
tslib_content_ImgResource / tslib_content_ImageResource (cleaned up name)
tslib_content_ImgText / tslib_content_ImageText (cleaned up name)
tslib_content_LoadRegister
tslib_content_Media (since when do we have this BTW?)
tslib_content_Multimedia
tslib_content_Otable / tslib_content_OTable / what does the O stand for 
to clean up the name?
tslib_content_PhpScript
tslib_content_PhpScriptInt (do we need these two, maybe deprecate them?)
tslib_content_QtObject (should it extend tslib_content_Media?)
tslib_content_Records
tslib_content_RestoreRegister
tslib_content_Searchresult / tslib_content_SearchResult
tslib_content_SwfObject (should it extend tslib_content_Media?)
tslib_content_Template
tslib_content_Text
tslib_content_User
tslib_content_UserInt


Further more that one now can add own content elements is great, but the 
way is not completely right yet, also violating naming conventions.

If I have a new CE in EXT:mynewce it must be named 
tx_mynewce_MyWhateverNamedNewContentElement, it is in the extension's 
namespace, not in the namespace of tslib_content ...


Keep this up, it's going to lead to more flexeblity when finished. We 
should do it right though.



all the best
Ingo

-- 
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2



More information about the TYPO3-team-core mailing list