[TYPO3-mvc] ExtBase Ext without own tables, just using other tables (pages)

Stephen Bungert stephenbungert at yahoo.de
Fri Oct 21 22:43:55 CEST 2011


Hello,

I want to make an extension that outputs information from the pages table. 
It doesn't need it's own tables.

I have a view that works, but doesn't have anything to display at the 
moment.

I then setup the mapping for the pages table:

plugin.tx_nextprev {
 view {
  templateRootPath = {$plugin.tx_nextprev.view.templateRootPath}
  partialRootPath = {$plugin.tx_nextprev.view.partialRootPath}
  layoutRootPath = {$plugin.tx_nextprev.view.layoutRootPath}
 }

 persistence {
  storagePid = {$plugin.tx_nextprev.persistence.storagePid}

  classes {
   Tx_Nextprev_Domain_Model_Pages {
    mapping {
     tableName = pages
     recordType = Tx_Nextprev_Domain_Model_Pages
     columns {
      uid.mapOnProperty = id
      title.mapOnProperty = title
      doktype.mapOnProperty = type
      hidden.mapOnProperty = hidden
      deleted.mapOnProperty = deleted
      nav_hide.mapOnProperty = notInMenu
     }
    }
   }
  }
 }

 settings {
  rootPage {
   # Starting page (which page to collect page uids from)
   uid = 3

   # Should the root page be included in the next/prev chain?
   include = 0
  }

  pages {
   # Include shortcut pages
   shortcut = 1

   # Include notInMenu pages
   notInMenu = 1

   # Page UIDs to exclude
   #excludedUids =
  }
 }
}


Here is my action function:



 /**
  * action buttons
  *
  * @return void
  */
 public function buttonsAction() {
  $pages = $this->buttonsRepository->findAll();
  #t3lib_div::debug($pages, 1);
  $this->view->assign('pages', $pages);
  $this->view->assign('settings', $this->settings);
 }

If I leave it as it is the page is generated and fluid shows a message, like 
it should. No errors are displayed so i assume findAll() actually found what 
it needs to.

If I uncomment the debug, the page timesout and is all white.

My PHP error log shows a bytes exhausted error in 
C:\\xampp\\htdocs\\stephen\\typo3\\4.6\\t3lib\\utility\\class.t3lib_utility_debug.php 
on line 154

I don't think that findAll is finding pages like I thought it would.

Other extbase extensions that I have played around making worked, but they 
had their own tables.

How can I see what findAll is doing? Can I make an extension that doesn't 
have it's own tables? I'm not sure if I have cretaed all the required files, 
a lot of the view templates and controllers and things I created myself 
based on other extbase extensions that I created as the extension builder 
only seems to create these things when you create tables.

Stephen. 



More information about the TYPO3-project-typo3v4mvc mailing list