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

Ingo Renner ingo at typo3.org
Mon Jul 19 11:48:57 CEST 2010


Steffen Kamper wrote:

Hi Steffen,

>> 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 ...
>>
>
> We also have this obts right now, i'm not sure if it's still used, but
> it's also not following the naming conventions. This way adding own
> elements is now like a "gap" as tslib_content try to hint the class name
> with tslib_content_[object], but without any official guide, just a side
> effect. I would appreciate any suggestions how to deal that ;)

Maybe we can drop OBTS or at least deprecate it...

Just have the extensions register new content elements (somewhere, somehow)

$contenElememts['myCe'] = 'class name of the new CE'; // should use 
autoloader to load, so no path required

Then just check if ($myCeObject instanceof tslib_content_Abstract) { ... }


HTH
Ingo

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



More information about the TYPO3-team-core mailing list