/** * @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; }
/** * Returns the number of objects in the result * * @return integer The number of matching objects * @api */ public function count() { return $this->query->count(); }