2010-11-24 Steffen Kamper <steffen@typo3.org>
+ * Fixed bug #14050: CleanUp - CGL format of t3lib files - t3lib_tree_directory
* Fixed bug #14050: CleanUp - CGL format of t3lib files - t3lib_tceforms_directory
* Fixed bug #14050: CleanUp - CGL format of t3lib files - t3lib_stddb_directory
* Fixed bug #14050: CleanUp - CGL format of t3lib files - t3lib_spritemanager_directory
<?php
/***************************************************************
-* Copyright notice
-*
-* (c) 2010 TYPO3 Tree Team <http://forge.typo3.org/projects/typo3v4-extjstrees>
-* All rights reserved
-*
-* This script is part of the TYPO3 project. The TYPO3 project is
-* free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* The GNU General Public License can be found at
-* http://www.gnu.org/copyleft/gpl.html.
-* A copy is found in the textfile GPL.txt and important notices to the license
-* from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-* This script is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
+ * Copyright notice
+ *
+ * (c) 2010 TYPO3 Tree Team <http://forge.typo3.org/projects/typo3v4-extjstrees>
+ * All rights reserved
+ *
+ * This script is part of the TYPO3 project. The TYPO3 project is
+ * free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * The GNU General Public License can be found at
+ * http://www.gnu.org/copyleft/gpl.html.
+ * A copy is found in the textfile GPL.txt and important notices to the license
+ * from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ * This script is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
/**
* Abstract Tree Data Provider
* @param t3lib_tree_Node $node
* @return t3lib_tree_NodeCollection
*/
- abstract public function getNodes(t3lib_tree_Node $node);
+ abstract public function getNodes(t3lib_tree_Node $node);
}
+
?>
\ No newline at end of file
<?php
/***************************************************************
-* Copyright notice
-*
-* (c) 2010 TYPO3 Tree Team <http://forge.typo3.org/projects/typo3v4-extjstrees>
-* All rights reserved
-*
-* This script is part of the TYPO3 project. The TYPO3 project is
-* free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* The GNU General Public License can be found at
-* http://www.gnu.org/copyleft/gpl.html.
-* A copy is found in the textfile GPL.txt and important notices to the license
-* from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-* This script is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
+ * Copyright notice
+ *
+ * (c) 2010 TYPO3 Tree Team <http://forge.typo3.org/projects/typo3v4-extjstrees>
+ * All rights reserved
+ *
+ * This script is part of the TYPO3 project. The TYPO3 project is
+ * free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * The GNU General Public License can be found at
+ * http://www.gnu.org/copyleft/gpl.html.
+ * A copy is found in the textfile GPL.txt and important notices to the license
+ * from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ * This script is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
/**
* Abstract State Provider
*/
abstract public function getState();
}
+
?>
\ No newline at end of file
<?php
/***************************************************************
-* Copyright notice
-*
-* (c) 2010 TYPO3 Tree Team <http://forge.typo3.org/projects/typo3v4-extjstrees>
-* All rights reserved
-*
-* This script is part of the TYPO3 project. The TYPO3 project is
-* free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* The GNU General Public License can be found at
-* http://www.gnu.org/copyleft/gpl.html.
-* A copy is found in the textfile GPL.txt and important notices to the license
-* from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-* This script is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
+ * Copyright notice
+ *
+ * (c) 2010 TYPO3 Tree Team <http://forge.typo3.org/projects/typo3v4-extjstrees>
+ * All rights reserved
+ *
+ * This script is part of the TYPO3 project. The TYPO3 project is
+ * free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * The GNU General Public License can be found at
+ * http://www.gnu.org/copyleft/gpl.html.
+ * A copy is found in the textfile GPL.txt and important notices to the license
+ * from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ * This script is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
/**
* Abstract Tree
public function getDataProvider() {
return $this->dataProvider;
}
+
/**
* @param t3lib_tree_renderer_Abstract $dataProvider
* @return void
<?php
/***************************************************************
-* Copyright notice
-*
-* (c) 2010 TYPO3 Tree Team <http://forge.typo3.org/projects/typo3v4-extjstrees>
-* All rights reserved
-*
-* This script is part of the TYPO3 project. The TYPO3 project is
-* free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* The GNU General Public License can be found at
-* http://www.gnu.org/copyleft/gpl.html.
-* A copy is found in the textfile GPL.txt and important notices to the license
-* from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-* This script is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
+ * Copyright notice
+ *
+ * (c) 2010 TYPO3 Tree Team <http://forge.typo3.org/projects/typo3v4-extjstrees>
+ * All rights reserved
+ *
+ * This script is part of the TYPO3 project. The TYPO3 project is
+ * free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * The GNU General Public License can be found at
+ * http://www.gnu.org/copyleft/gpl.html.
+ * A copy is found in the textfile GPL.txt and important notices to the license
+ * from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ * This script is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
/**
* Tree Node
* @param t3lib_tree_NodeCollection $childNodes
* @return void
*/
- public function setChildNodes (t3lib_tree_NodeCollection $childNodes) {
+ public function setChildNodes(t3lib_tree_NodeCollection $childNodes) {
$this->childNodes = $childNodes;
}
* @param t3lib_tree_Node $parentNode
* @return void
*/
- public function setParentNode (t3lib_tree_Node $parentNode = NULL) {
+ public function setParentNode(t3lib_tree_Node $parentNode = NULL) {
$this->parentNode = $parentNode;
}
*
* @return t3lib_tree_Node
*/
- public function getParentNode () {
+ public function getParentNode() {
return $this->parentNode;
}
if (isset($data['parentNode']) && $data['parentNode'] !== '') {
$this->setParentNode(t3lib_div::makeInstance(
- $data['parentNode']['serializeClassName'],
- $data['parentNode']
- ));
+ $data['parentNode']['serializeClassName'],
+ $data['parentNode']
+ ));
}
if (isset($data['childNodes']) && $data['childNodes'] !== '') {
$this->setChildNodes(t3lib_div::makeInstance(
- $data['childNodes']['serializeClassName'],
- $data['childNodes']
- ));
+ $data['childNodes']['serializeClassName'],
+ $data['childNodes']
+ ));
}
}
$this->dataFromArray($arrayRepresentation);
}
}
+
?>
\ No newline at end of file
<?php
/***************************************************************
-* Copyright notice
-*
-* (c) 2010 TYPO3 Tree Team <http://forge.typo3.org/projects/typo3v4-extjstrees>
-* All rights reserved
-*
-* This script is part of the TYPO3 project. The TYPO3 project is
-* free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* The GNU General Public License can be found at
-* http://www.gnu.org/copyleft/gpl.html.
-* A copy is found in the textfile GPL.txt and important notices to the license
-* from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-* This script is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
+ * Copyright notice
+ *
+ * (c) 2010 TYPO3 Tree Team <http://forge.typo3.org/projects/typo3v4-extjstrees>
+ * All rights reserved
+ *
+ * This script is part of the TYPO3 project. The TYPO3 project is
+ * free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * The GNU General Public License can be found at
+ * http://www.gnu.org/copyleft/gpl.html.
+ * A copy is found in the textfile GPL.txt and important notices to the license
+ * from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ * This script is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
/**
* Tree Node Collection
}
}
}
+
?>
\ No newline at end of file
<?php
/***************************************************************
-* Copyright notice
-*
-* (c) 2010 TYPO3 Tree Team <http://forge.typo3.org/projects/typo3v4-extjstrees>
-* All rights reserved
-*
-* This script is part of the TYPO3 project. The TYPO3 project is
-* free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* The GNU General Public License can be found at
-* http://www.gnu.org/copyleft/gpl.html.
-* A copy is found in the textfile GPL.txt and important notices to the license
-* from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-* This script is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
+ * Copyright notice
+ *
+ * (c) 2010 TYPO3 Tree Team <http://forge.typo3.org/projects/typo3v4-extjstrees>
+ * All rights reserved
+ *
+ * This script is part of the TYPO3 project. The TYPO3 project is
+ * free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * The GNU General Public License can be found at
+ * http://www.gnu.org/copyleft/gpl.html.
+ * A copy is found in the textfile GPL.txt and important notices to the license
+ * from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ * This script is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
/**
* Representation Tree Node
/**
* @return string
*/
- public function getType () {
+ public function getType() {
return $this->type;
}
public function toArray() {
$arrayRepresentation = parent::toArray();
$arrayRepresentation = array_merge($arrayRepresentation, array(
- 'label' => $this->label,
- 'type' => $this->type,
- 'class' => $this->class,
- 'icon' => $this->icon,
- 'callbackAction' => $this->callbackAction
- ));
+ 'label' => $this->label,
+ 'type' => $this->type,
+ 'class' => $this->class,
+ 'icon' => $this->icon,
+ 'callbackAction' => $this->callbackAction
+ ));
return $arrayRepresentation;
}
$this->setCallbackAction($data['callbackAction']);
}
}
+
?>
\ No newline at end of file
<?php
/***************************************************************
-* Copyright notice
-*
-* (c) 2010 TYPO3 Tree Team <http://forge.typo3.org/projects/typo3v4-extjstrees>
-* All rights reserved
-*
-* This script is part of the TYPO3 project. The TYPO3 project is
-* free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* The GNU General Public License can be found at
-* http://www.gnu.org/copyleft/gpl.html.
-* A copy is found in the textfile GPL.txt and important notices to the license
-* from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-* This script is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
+ * Copyright notice
+ *
+ * (c) 2010 TYPO3 Tree Team <http://forge.typo3.org/projects/typo3v4-extjstrees>
+ * All rights reserved
+ *
+ * This script is part of the TYPO3 project. The TYPO3 project is
+ * free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * The GNU General Public License can be found at
+ * http://www.gnu.org/copyleft/gpl.html.
+ * A copy is found in the textfile GPL.txt and important notices to the license
+ * from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ * This script is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
/**
* Sorted Tree Node Collection
if ($this->offsetGet($divider)->equals($node)) {
return $divider;
} elseif ($this->offsetGet($divider)->compareTo($node) > 0) {
- return $this->binarySearch($node, $start , $divider - 1);
+ return $this->binarySearch($node, $start, $divider - 1);
} else {
- return $this->binarySearch($node, $divider + 1 , $end);
+ return $this->binarySearch($node, $divider + 1, $end);
}
} else {
if ($this->offsetGet($start)->equals($node)) {
}
}
}
+
?>
\ No newline at end of file
<?php
/***************************************************************
-* Copyright notice
-*
-* (c) 2010 TYPO3 Tree Team <http://forge.typo3.org/projects/typo3v4-extjstrees>
-* All rights reserved
-*
-* This script is part of the TYPO3 project. The TYPO3 project is
-* free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* The GNU General Public License can be found at
-* http://www.gnu.org/copyleft/gpl.html.
-* A copy is found in the textfile GPL.txt and important notices to the license
-* from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-* This script is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
+ * Copyright notice
+ *
+ * (c) 2010 TYPO3 Tree Team <http://forge.typo3.org/projects/typo3v4-extjstrees>
+ * All rights reserved
+ *
+ * This script is part of the TYPO3 project. The TYPO3 project is
+ * free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * The GNU General Public License can be found at
+ * http://www.gnu.org/copyleft/gpl.html.
+ * A copy is found in the textfile GPL.txt and important notices to the license
+ * from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ * This script is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
/**
* Abstract ExtJS tree based on ExtDirect
<?php
/***************************************************************
-* Copyright notice
-*
-* (c) 2010 TYPO3 Tree Team <http://forge.typo3.org/projects/typo3v4-extjstrees>
-* All rights reserved
-*
-* This script is part of the TYPO3 project. The TYPO3 project is
-* free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* The GNU General Public License can be found at
-* http://www.gnu.org/copyleft/gpl.html.
-* A copy is found in the textfile GPL.txt and important notices to the license
-* from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-* This script is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
+ * Copyright notice
+ *
+ * (c) 2010 TYPO3 Tree Team <http://forge.typo3.org/projects/typo3v4-extjstrees>
+ * All rights reserved
+ *
+ * This script is part of the TYPO3 project. The TYPO3 project is
+ * free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * The GNU General Public License can be found at
+ * http://www.gnu.org/copyleft/gpl.html.
+ * A copy is found in the textfile GPL.txt and important notices to the license
+ * from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ * This script is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
/**
* Abstract Renderer
*/
abstract public function renderTree(t3lib_tree_AbstractTree $tree, $recursive = TRUE);
}
+
?>
\ No newline at end of file
$nodeArray['children'] = $children;
$this->recursionLevel--;
}
+
return $nodeArray;
}
protected function getNodeArray(t3lib_tree_RepresentationNode $node) {
$nodeArray = array(
'iconCls' => $node->getIcon(),
- 'text' => $node->getLabel() ,
+ 'text' => $node->getLabel(),
'leaf' => !$node->hasChildNodes(),
'id' => $node->getId(),
'uid' => $node->getId()
);
+
return $nodeArray;
}
* @return mixed
*/
public function renderNodeCollection(t3lib_tree_NodeCollection $collection, $recursive = TRUE) {
- foreach($collection as $node) {
+ foreach ($collection as $node) {
$treeItems[] = $this->renderNode($node, $recursive);
}
return $treeItems;
<?php
/***************************************************************
-* Copyright notice
-*
-* (c) 2010 TYPO3 Tree Team <http://forge.typo3.org/projects/typo3v4-extjstrees>
-* All rights reserved
-*
-* This script is part of the TYPO3 project. The TYPO3 project is
-* free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* The GNU General Public License can be found at
-* http://www.gnu.org/copyleft/gpl.html.
-* A copy is found in the textfile GPL.txt and important notices to the license
-* from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-* This script is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
+ * Copyright notice
+ *
+ * (c) 2010 TYPO3 Tree Team <http://forge.typo3.org/projects/typo3v4-extjstrees>
+ * All rights reserved
+ *
+ * This script is part of the TYPO3 project. The TYPO3 project is
+ * free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * The GNU General Public License can be found at
+ * http://www.gnu.org/copyleft/gpl.html.
+ * A copy is found in the textfile GPL.txt and important notices to the license
+ * from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ * This script is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
/**
* Renderer for unordered lists
* @return mixed
*/
public function renderNode(t3lib_tree_RepresentationNode $node, $recursive = TRUE) {
- $code = '<li><span class="' . $node->getIcon() .'"> </span>' . $node->getLabel();
+ $code = '<li><span class="' . $node->getIcon() . '"> </span>' . $node->getLabel();
if ($recursive && $node->getChildNodes() !== NULL) {
$this->recursionLevel++;
$code .= $this->renderNodeCollection($node->getChildNodes());
}
$code .= '</li>';
+
return $code;
}
$code = '<ul class="level' . $this->recursionLevel . '" style="margin-left:10px">';
$code .= $this->renderNode($tree->getRoot(), $recursive);
$code .= '</ul>';
+
return $code;
}
*/
public function renderNodeCollection(t3lib_tree_NodeCollection $collection, $recursive = TRUE) {
$code = '<ul class="level' . $this->recursionLevel . '" style="margin-left:10px">';
- foreach($collection as $node) {
+ foreach ($collection as $node) {
$code .= $this->renderNode($node, $recursive);
}
$code .= '</ul>';
+
return $code;
}
}
+
?>
\ No newline at end of file
* @return void
*/
public function setHasChildren($value) {
- $this->hasChildren = (boolean)$value;
+ $this->hasChildren = (boolean) $value;
}
/**
}
$node->setChildNodes($childNodes);
}
+
return $node;
}
$nodeData = NULL;
if ($node->getId() !== 0) {
$nodeData = current($GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
- '*',
- $this->tableName,
- 'uid=' . $node->getId()
- ));
+ '*',
+ $this->tableName,
+ 'uid=' . $node->getId()
+ ));
}
if ($nodeData == NULL) {
$nodeData = array(
if (count($children)) {
$storage = t3lib_div::makeInstance('t3lib_tree_NodeCollection');
foreach ($children as $child) {
- $node = t3lib_div::makeInstance('t3lib_tree_Node');;
+ $node = t3lib_div::makeInstance('t3lib_tree_Node');
+ ;
$node->setId($child);
if ($level <= $this->levelMaximum) {
$children = $this->getChildrenOf($node, $level + 1);
$storage->append($node);
}
}
+
return $storage;
}
$uid = $row['uid'];
$columnConfiguration = $GLOBALS['TCA'][$this->getTableName()]['columns'][$this->getLookupField()]['config'];
- switch ((string)$columnConfiguration['type']) {
+ switch ((string) $columnConfiguration['type']) {
case 'inline':
case 'select':
if ($columnConfiguration['MM']) {
$dbGroup = t3lib_div::makeInstance('t3lib_loadDBGroup');
- // dummy field for setting "look from other site"
+ // dummy field for setting "look from other site"
$columnConfiguration['MM_oppositeField'] = 'children';
$dbGroup->start(
'uid',
$columnConfiguration['foreign_table'],
" (CONCAT(','," . $columnConfiguration['foreign_field'] . ",',') LIKE '%," . intval($uid) . ",%' "
- . (intval($uid) == 0 ? (" OR " . $columnConfiguration['foreign_field'] . " = ''") : '' )
- . ") " . t3lib_BEfunc::deleteClause( $columnConfiguration['foreign_table'])
+ . (intval($uid) == 0 ? (" OR " . $columnConfiguration['foreign_field'] . " = ''") : '')
+ . ") " . t3lib_BEfunc::deleteClause($columnConfiguration['foreign_table'])
);
foreach ($records as $record) {
$relatedUids[] = $record['uid'];
'uid',
$columnConfiguration['foreign_table'],
" (CONCAT(','," . $this->getLookupField() . ",',') LIKE '%," . intval($uid) . ",%' "
- . (intval($uid) == 0 ? (" OR " . $this->getLookupField() . " = ''") : '' )
- . ") " . t3lib_BEfunc::deleteClause( $columnConfiguration['foreign_table'])
+ . (intval($uid) == 0 ? (" OR " . $this->getLookupField() . " = ''") : '')
+ . ") " . t3lib_BEfunc::deleteClause($columnConfiguration['foreign_table'])
);
foreach ($records as $record) {
$relatedUids[] = $record['uid'];
}
}
- break;
+ break;
case 'group':
$records = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
'uid',
$columnConfiguration['foreign_table'],
" (CONCAT(','," . $this->getLookupField() . ",',') LIKE '%," . intval($uid) . ",%' "
- . (intval($uid) == 0 ? (" OR " . $this->getLookupField() . " = ''") : '' )
- . ") " . t3lib_BEfunc::deleteClause( $columnConfiguration['foreign_table'])
+ . (intval($uid) == 0 ? (" OR " . $this->getLookupField() . " = ''") : '')
+ . ") " . t3lib_BEfunc::deleteClause($columnConfiguration['foreign_table'])
);
foreach ($records as $record) {
$relatedUids[] = $record['uid'];
}
break;
}
+
return $relatedUids;
}
+
/**
* Gets related children records depending on TCA configuration
*
$value = $row[$this->getLookupField()];
$columnConfiguration = $GLOBALS['TCA'][$this->getTableName()]['columns'][$this->getLookupField()]['config'];
- switch ((string)$columnConfiguration['type']) {
+ switch ((string) $columnConfiguration['type']) {
case 'inline':
case 'select':
if ($columnConfiguration['MM']) {
} else {
$relatedUids = t3lib_div::intExplode(',', $value, TRUE);
}
- break;
+ break;
case 'group':
$relatedUids = t3lib_div::intExplode(',', $value, TRUE);
break;
}
+
return $relatedUids;
}
}
if (isset($treeConfiguration['appearance']['expandAll'])) {
- $dataProvider->setExpandAll((boolean)$treeConfiguration['appearance']['expandAll']);
+ $dataProvider->setExpandAll((boolean) $treeConfiguration['appearance']['expandAll']);
}
if (isset($treeConfiguration['appearance']['maxLevels'])) {
}
} elseif ($tcaConfiguration['internal_type'] == 'file') {
- // Not implemented yet
+ // Not implemented yet
throw new InvalidArgumentException(
'TCA Tree configuration is invalid: tree for "internal_type=file" not implemented yet',
'1288215891'
} else {
throw new InvalidArgumentException(
'TCA Tree configuration is invalid: tree for "internal_type=' .
- $tcaConfiguration['internal_type'] .
- '" not implemented yet',
+ $tcaConfiguration['internal_type'] .
+ '" not implemented yet',
'1288215892'
);
}
+
return $dataProvider;
}
}
$nodeArray = array_merge(
$nodeArray,
array(
- 'expanded' => $node->getExpanded(),
- 'expandable' => $node->hasChildNodes(),
- 'checked' => $node->getSelected(),
+ 'expanded' => $node->getExpanded(),
+ 'expandable' => $node->hasChildNodes(),
+ 'checked' => $node->getSelected(),
)
);
if (!$node->getSelectable()) {
unset ($nodeArray['checked']);
}
+
return $nodeArray;
}