/**
  * @return Tx_Doctrine2_Query
  */
 public function create($className)
 {
     $query = new Tx_Doctrine2_Query($className);
     $query->injectEntityManager($this->manager->getEntityManager());
     if (!$this->objectManager || !$this->configurationManager) {
         return $query;
     }
     $querySettings = $this->objectManager->create('Tx_Extbase_Persistence_QuerySettingsInterface');
     $frameworkConfiguration = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     $querySettings->setStoragePageIds(t3lib_div::intExplode(',', $frameworkConfiguration['persistence']['storagePid']));
     $query->setQuerySettings($querySettings);
     return $query;
 }
 public function injectPersistenceManager(Tx_Extbase_Persistence_ManagerInterface $manager)
 {
     $this->entityManager = $manager->getEntityManager();
 }