[TYPO3-mvc] Nearly completly confused

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Mon Feb 21 17:57:45 CET 2011


Sebastian Fischer wrote:
> How am i supposed to override the storagePid from controller indexAction?

Not exactly sure what you mean, I also didn't
use Extbase for backend modules yet.

You can, when saving objects, define the storagePid via
$object->setPid(15).

For reading objects, you could just disable the storagePid
in your repository, either create a custom method inside the
repository or completely disable it in the repository:

class Tx_Hype_Domain_Repository_Typo3_PageRepository extends 
Tx_Extbase_Persistence_Repository {
   public function createQuery() {
     $query = parent::createQuery($this->objectType);
     $query->getQuerySettings()->setRespectStoragePage(FALSE);
     return $query;
   }
}

Regards,
Thomas


More information about the TYPO3-project-typo3v4mvc mailing list