[TYPO3-core] RFC: #16228: [Feature] TCA tree
Georg Ringer
mail at ringerge.org
Tue Nov 2 23:44:34 CET 2010
Hi,
+1 on reading with the following CGL remarks:
- There are some functions with space before the '(' >
=> public function setSelectable (
=> public function getLookupField () {
- functions should be commented, yeah I know, boring stuff
- comments don't fit:
=> + * @param array $row
+ * @param t3lib_tree_tca_DatabaseNode $parent
+ * @param int $level
+ * @return t3lib_tree_tca_DatabaseNode
+ */
+ protected function buildRepresentationForNode(t3lib_tree_Node
$basicNode, t3lib_tree_tca_DatabaseNode $parent = NULL, $level = 0) {
- spaces / tabs
=> if ($maxitems<=1 && strcmp($config['renderMode'],'tree')) {
- force types
=> public function renderField($table, $field, $row, &$PA, &$tceForms) {
- $pageRenderer->addJsFile('../t3lib/js/extjs/tree/tree.js');
is hardcoding the path the correct way? don't know. is it always ../ for
the backpath? is there no GLOBALS['BACK_PATH']?
- comments:
+ * @static
+ * @param array $tcaConfiguration
+ * @return t3lib_tree_tca_AbstractTCATreeDataProvider
+ */
+ public static function getDataProvider (array $tcaConfiguration,
$table, $field, $currentValue) {
- why a elseif if the else is ok too
+ } elseif ($tcaConfiguration['internal_type'] == 'file') {
+ $error = TRUE;
+ } else {
+ $error = TRUE;
+ }
- I don't like the $error = TRUE so much. but IMHO
- initialize vars:
public function renderNodeCollection(t3lib_tree_NodeCollection
$collection, $recursive = TRUE) {
+ foreach($collection as $node) {
+ $treeItems[] = $this->renderNode($node, $recursive);
+ }
+ return $treeItems;
+ }
georg
More information about the TYPO3-team-core
mailing list