EXTMVC:
authorJochen Rau <j.rau@web.de>
Tue, 24 Mar 2009 20:32:54 +0000 (20:32 +0000)
committerJochen Rau <j.rau@web.de>
Tue, 24 Mar 2009 20:32:54 +0000 (20:32 +0000)
* Added some TODOs

typo3/sysext/extbase/Classes/Persistence/Mapper/ColumnMap.php
typo3/sysext/extbase/Classes/Persistence/Mapper/ObjectRelationalMapper.php
typo3/sysext/extbase/class.tx_extmvc_dispatcher.php

index f226f04..0c22626 100644 (file)
@@ -129,6 +129,7 @@ class TX_EXTMVC_Persistence_Mapper_ColumnMap {
        protected $parentTableFieldName;
 
        public function __construct($columnName) {
+               // TODO Enable aliases (tx_anotherextension_addedcolumn -> theAddedColumn)
                $this->setColumnName($columnName);
                $this->setPropertyName(TX_EXTMVC_Utility_Strings::underscoredToLowerCamelCase($columnName));
        }
index ea57a11..d4cc9e4 100644 (file)
@@ -235,6 +235,7 @@ class TX_EXTMVC_Persistence_Mapper_ObjectRelationalMapper implements t3lib_Singl
                }
 
                unset($row['uid']);
+               // TODO Check if there is a pid field/tstamp field
                $row['pid'] = !empty($this->cObj->data['pages']) ? $this->cObj->data['pages'] : $GLOBALS['TSFE']->id;
                $row['tstamp'] = time();
 
@@ -329,7 +330,7 @@ class TX_EXTMVC_Persistence_Mapper_ObjectRelationalMapper implements t3lib_Singl
         * Returns a table row to be inserted or updated in the database
         *
         * @param TX_EXTMVC_Persistence_Mapper_DataMap $dataMap The appropriate data map representing a database table
-        * @param string $properties The properties of the object
+        * @param array $properties The properties of the object
         * @return array A single row to be inserted in the database
         */
        // SK: I need to check this more thorougly
@@ -341,6 +342,7 @@ class TX_EXTMVC_Persistence_Mapper_ObjectRelationalMapper implements t3lib_Singl
                        if ($columnMap->getTypeOfRelation() === TX_EXTMVC_Persistence_Mapper_ColumnMap::RELATION_HAS_MANY) {
                                $row[$columnName] = count($properties[$propertyName]);
                        } elseif ($columnMap->getTypeOfRelation() === TX_EXTMVC_Persistence_Mapper_ColumnMap::RELATION_HAS_AND_BELONGS_TO_MANY) {
+                               // TODO Check if this elseif is needed or could be merged with the above
                                $row[$columnName] = count($properties[$propertyName]);
                        } else {
                                if ($properties[$propertyName] !== NULL) {
index 49608fb..6ab4691 100644 (file)
@@ -125,7 +125,6 @@ class TX_EXTMVC_Dispatcher {
                }
                // TODO Handle $response->getStatus()
                // SK: Call sendHeaders() on the response
-               // JR: I don't think we need this, because the header will be sent by TYPO3
                return $response->getContent();
        }