‪TYPO3CMS  10.4
RepositoryRepository.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
20 
26 {
30  public function ‪initializeObject()
31  {
32  ‪$defaultQuerySettings = $this->objectManager->get(QuerySettingsInterface::class);
35  }
36 
43  public function ‪updateRepositoryCount($extCount, $uid = 1)
44  {
45  $repository = $this->‪findByUid($uid);
46 
47  $repository->setLastUpdate(new \DateTime());
48  $repository->setExtensionCount((int)$extCount);
49 
50  $this->‪update($repository);
51  }
52 
58  public function ‪findOneTypo3OrgRepository()
59  {
60  $allRepositories = $this->‪findAll();
61  $typo3OrgRepository = null;
62  foreach ($allRepositories as $repository) {
64  if ($repository->getTitle() === 'TYPO3.org Main Repository') {
65  $typo3OrgRepository = $repository;
66  break;
67  }
68  }
69  return $typo3OrgRepository;
70  }
71 }
‪TYPO3\CMS\Extensionmanager\Domain\Repository\RepositoryRepository\updateRepositoryCount
‪updateRepositoryCount($extCount, $uid=1)
Definition: RepositoryRepository.php:43
‪TYPO3\CMS\Extensionmanager\Domain\Repository
Definition: ExtensionRepository.php:16
‪TYPO3\CMS\Extbase\Persistence\Repository\findByUid
‪object null findByUid($uid)
Definition: Repository.php:152
‪TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface\setRespectStoragePage
‪TYPO3 CMS Extbase Persistence Generic QuerySettingsInterface setRespectStoragePage($respectStoragePage)
‪TYPO3\CMS\Extensionmanager\Domain\Repository\RepositoryRepository
Definition: RepositoryRepository.php:26
‪TYPO3\CMS\Extbase\Persistence\Repository\$defaultQuerySettings
‪TYPO3 CMS Extbase Persistence Generic QuerySettingsInterface $defaultQuerySettings
Definition: Repository.php:51
‪TYPO3\CMS\Extbase\Persistence\Repository
Definition: Repository.php:29
‪TYPO3\CMS\Extbase\Persistence\Repository\setDefaultQuerySettings
‪setDefaultQuerySettings(QuerySettingsInterface $defaultQuerySettings)
Definition: Repository.php:194
‪TYPO3\CMS\Extensionmanager\Domain\Repository\RepositoryRepository\initializeObject
‪initializeObject()
Definition: RepositoryRepository.php:30
‪TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface
Definition: QuerySettingsInterface.php:22
‪TYPO3\CMS\Extbase\Persistence\Repository\update
‪update($modifiedObject)
Definition: Repository.php:107
‪TYPO3\CMS\Extbase\Persistence\Repository\findAll
‪QueryResultInterface array findAll()
Definition: Repository.php:120
‪TYPO3\CMS\Extensionmanager\Domain\Repository\RepositoryRepository\findOneTypo3OrgRepository
‪TYPO3 CMS Extensionmanager Domain Model Repository null findOneTypo3OrgRepository()
Definition: RepositoryRepository.php:58