[TYPO3-core] RFC #6872: Add suggest-like feature to TCEforms
Ingo Renner
ingo at typo3.org
Tue Jan 8 22:02:32 CET 2008
Hi Andreas,
nice feature! I didn't test it yet but there're some things that need to
be changed:
* Olly already mentioned it: please use Benni's unified AJAX interface
* if it's t3lib_ it must go into t3lib/
* ajax is a very general name, how about naming the class
...ajaxSuggest, ...suggest or something similar
* please use php5 access keywords (private/public/protected)
* instead of init() you can use __construct()
* fObj should be more describtive: plain tceForms or tceFormsReference
* prependCmdFieldNames -> prependCommandFieldNames
* no need for CDATA in the js file, put the svn Id property in a comment
above the object, comment the methods in the js object (java/phpDoc)
* as far as I remember we do not use an @since comment
* in AJAXautocompleter: split those long lines where you assign values
to $config into multiple lines
* $queryTables as $tbl -> $queryTables as $queryTable
* $pid is truely debatebly but newbees for shure won't know that you
mean $pageId
* $resultrows -> $resultRows, $listitems -> $listItems
* $resultrows as $k=>$v, use more descriptive names for $k and $v, $key
and $value would be ok but I'm sure there're better names
* $rows_sort -> $rowsSort, $returnrows -> $returnRows, there're more
variables like this, just have a look
* selectRecords(), getLabel(): only have a single return statement per
method
* class.suggest_default_selector.php -> class.suggestDefaultSelector.php
* the double if where you check for hideSuggestByDefault can be combined
into one
* I'd be fine to introduce a js directory as t3lib/js/ where new t3lib
js files would go into
...should be enough for now =)
Ingo
--
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2
More information about the TYPO3-team-core
mailing list