$settings = array();
$settings['storagePid'] = $this->getDefaultStoragePageId($cObj);
$settings['contentObjectData'] = $cObj->data;
+ // TODO Support BE modules by parsing the file "manually" and all files EXT:myext/Configuration/Objects/setup.txt
$extbaseConfiguration = $GLOBALS['TSFE']->tmpl->setup['config.']['tx_extbase.'];
if (is_array($extbaseConfiguration)) {
$extbaseConfiguration = Tx_Extbase_Configuration_Manager::postProcessSettings($extbaseConfiguration);
protected function getDefaultStoragePageId($cObj) {
if (is_string($cObj->data['pages'])) {
if (count(explode(',', $cObj->data['pages'])) > 1) {
+ // TODO Should we take the first pid after explode?
throw new InvalidArgumentException('More than one storage page ID given. This is currently not supported.', 1247597243);
}
return (int)$cObj->data['pages'];
if ($cObj->parentRecord->data['storage_pid'] > 0) {
return (int)$cObj->parentRecord->data['storage_pid'];
}
+ // FIXME Take $GLOBALS['TSFE']->getStorageSiterootPids(); as default for FE and 0 for BE
return self::DEFAULT_STORAGE_PID;
}
/**
* Removes all trailing dots recursively from TS settings array
+ * TODO Explain why we remove the dots.
*
* @param array $setup The settings array
* @return void
* @param array $properties The properties of the object
* @return array A single row to be inserted in the database
*/
+ // TODO Should we pass an extra flag (UPDATE/INSERT)?
protected function addCommonFieldsToRow(Tx_Extbase_DomainObject_DomainObjectInterface $object, $parentObject = NULL, $parentPropertyName = NULL, array &$row) {
$className = get_class($object);
$dataMap = $this->dataMapper->getDataMap($className);
* (non-PHPdoc)
* @see Classes/Persistence/Tx_Extbase_Persistence_Typo3QueryInterface#useStoragePage($useStoragePage)
*/
- // TODO move this method to the settings
public function useStoragePage($useStoragePage) {
$this->backendSpecificQuerySettings->useStoragePage($useStoragePage);
return this;
* (non-PHPdoc)
* @see Classes/Persistence/Tx_Extbase_Persistence_Typo3QueryInterface#useEnableFields($useEnableFields)
*/
- // TODO move this method to the settings
public function useEnableFields($useEnableFields) {
$this->backendSpecificQuerySettings->useEnableFields($useEnableFields);
return this;
--- /dev/null
+<?php
+/***************************************************************
+* Copyright notice
+*
+* (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+* All rights reserved
+*
+* This class is a backport of the corresponding class of FLOW3.
+* All credits go to the v5 team.
+*
+* 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.
+*
+* 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!
+***************************************************************/
+
+class Tx_Extbase_Persistence_Storage_Typo3DbBackend_testcase extends Tx_Extbase_Base_testcase {
+
+ public function setUp() {
+
+ }
+
+ /**
+ * @test
+ */
+// public function anObjectCanBeAttached() {
+// }
+
+}
+?>
\ No newline at end of file