[TYPO3-core] RFC: #0006579: Make htmlArea RTE extensible

Ingo Renner ingo at typo3.org
Tue Oct 23 19:45:15 CEST 2007


Hi Stanislas,

I'm very glad you're back and working so enthusiastically on rtehtmlarea 
again!

Here are some remarks for your patch:

line 10:
you're free to (and should) use php5 now, please make $registeredPlugins 
private unless there's a good reason to not to do so.

line 23:
please use clear non abbreviated variable names, $pluginObjCfg => 
$pluginObjectConfiguration

line 24:
$pluginObj => $plugin (as it might/should be clear that it is an object) 
or $pluginObject or $pluginInstance

line 24:
$pluginObjCfg['objRef'] ... objectReference

line 26:
maybe the method should be named main() (as it is for most other TYPO3 
classes) or run() (mor php5 like I think)

line 28:
do not access object properties directly, use getters and setters 
(instead of $pluginObj->pluginButton)
- in general: you might think of requiring the plugin to implement an 
interface {} and then simply do a check for that by using "instanceof", 
maybe call the interface "RtePlugin" or "RteHtmlareaPlugin"

class MyCoolRtePlugin implements RteHtmlareaPlugin {} ...


line 30:
please use camelCase instead of underscores (conf_toolbar_convert, 
conf_toolbar_convert) (also use a getter method here - 
getToolbarConfiguration()) (also do not abbreviate variable names - conf)

line 46 and 84:
while( list() = each()) - use foreach instead

line 49:
what is $this->httpTypo3Path? Is there nothing you can use from 
t3lib_div::getIndpEnv() ?

line 62 and 106:
did you mean isPluginEnabled() (additional d)?

line 83, 84, 94, 102, 107 ...
what is $number, what does it do? please use descriptive variable names 
and add phpDoc for the methods (line 94)


line 84:
pluginEnableArrayMultiple is quite confusing - what does it contain?

line 105:
no abbreviations please

line 223 and after:
tx_rtehtmlareaapi is a new class, please make it use php5 only private, 
protected public __construct() and so on

line 226:
$locallangRelPath ... abbreviation

line 229:
$toolbar instead of $toolBar?

line 233:
$conf_toolbar_convert, please use camelCase instead of underscores

line 239:
empty line not needed

line 242:
main() or run() ? with php5 you also shouldn't need the & IIRR, 
$parentObject instead of $pObj

line 296:
buildJSConfig() => buildJavascriptConfiguration(), separate arguments 
with comma and space


line 314:
$registerRTEinJSString => $registerRTEinJavascriptString


please fix those style issues, I will then take a look at the code's 
functionality and give a +1 as I see this as an important improvement


keep it up
Ingo




























More information about the TYPO3-team-core mailing list