[TYPO3-dev] Mapping to “pages” table from Extbase in TYPO3 6.1

Rakesh Dodda rakeshdodda.rd at gmail.com
Tue Jul 30 08:56:45 CEST 2013


Hi All,

This question might be a possible duplicate to
http://typo3.toaster-schwerin.de/typo3_dev/2013_04/msg00217.html , but as
no solution was concluded, I'm posting this question.

My aim is to map the Typo3 pages table to my model Page in my extension
which is built on Extension Builder. I did not map to existing table from
Extension Builder, as it generates type mismatch error.

I created the following:

Domain/Model/Page.php and Domain/Repository/PageRepository.php

Domain/Model/Page.php contains a few getters and setters.


To map the pages table to Page model, I added the following to
Configuration/TypoScript/setup.txt

Playfield is the name of my extension.

config.tx_extbase.persistence.classes {
    TYPO3/Playfield/Domain/Model/Page {
    mapping {
                    tableName = pages
                }
       }
}

I also tried config.tx_playfield instead of config.tx_extbase.


But when I try

print_r($this->pagesRepository->findAll()->toArray());

from my controller it give me *NULL* result.

setup.txt is being loaded, I checked it trying the following:

plugin.tx_playfield {
settings {
 foo = bar
}
}


and my controller can access "foo".


It seems as if Extbase does not know that Pages model is mapped to a table.




-- 
Regards,
Rakesh Dodda



More information about the TYPO3-dev mailing list