TYPO3 CMS  TYPO3_6-2
RepositoryRepository.php
Go to the documentation of this file.
1 <?php
3 
22 
28  public function initializeObject() {
30  $defaultQuerySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\QuerySettingsInterface');
31  $defaultQuerySettings->setRespectStoragePage(FALSE);
33  }
34 
42  public function updateRepositoryCount($extCount, $uid = 1) {
43  $repository = $this->findByUid($uid);
44 
45  $repository->setLastUpdate(new \DateTime());
46  $repository->setExtensionCount((int)$extCount);
47 
48  $this->update($repository);
49  }
50 
56  public function findOneTypo3OrgRepository() {
57  $allRepositories = $this->findAll();
58  $typo3OrgRepository = NULL;
59  foreach ($allRepositories as $repository) {
61  if ($repository->getTitle() === 'TYPO3.org Main Repository') {
62  $typo3OrgRepository = $repository;
63  break;
64  }
65  }
66  return $typo3OrgRepository;
67  }
68 }
$uid
Definition: server.php:36
setDefaultQuerySettings(\TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface $defaultQuerySettings)
Definition: Repository.php:240