‪TYPO3CMS  ‪main
UpgradeWizardRegistry.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
20 use Symfony\Component\DependencyInjection\ServiceLocator;
21 
29 {
30  public function ‪__construct(
31  private readonly ServiceLocator $upgradeWizards
32  ) {}
33 
37  public function ‪hasUpgradeWizard(string ‪$identifier): bool
38  {
39  return $this->upgradeWizards->has(‪$identifier);
40  }
41 
46  {
47  if (!$this->‪hasUpgradeWizard($identifier)) {
48  throw new \UnexpectedValueException('Upgrade wizard with identifier ' . ‪$identifier . ' is not registered.', 1673964964);
49  }
50 
51  return $this->upgradeWizards->get(‪$identifier);
52  }
53 
59  public function ‪getUpgradeWizards(): array
60  {
61  return $this->upgradeWizards->getProvidedServices();
62  }
63 }
‪TYPO3\CMS\Install\Updates\UpgradeWizardRegistry\getUpgradeWizard
‪getUpgradeWizard(string $identifier)
Definition: UpgradeWizardRegistry.php:45
‪TYPO3\CMS\Install\Updates
Definition: LegacyClassesForIde.php:22
‪TYPO3\CMS\Install\Updates\UpgradeWizardRegistry\__construct
‪__construct(private readonly ServiceLocator $upgradeWizards)
Definition: UpgradeWizardRegistry.php:30
‪TYPO3\CMS\Install\Updates\UpgradeWizardInterface
Definition: UpgradeWizardInterface.php:24
‪TYPO3\CMS\Install\Updates\UpgradeWizardRegistry\getUpgradeWizards
‪array getUpgradeWizards()
Definition: UpgradeWizardRegistry.php:59
‪TYPO3\CMS\Install\Updates\UpgradeWizardRegistry
Definition: UpgradeWizardRegistry.php:29
‪TYPO3\CMS\Webhooks\Message\$identifier
‪identifier readonly string $identifier
Definition: FileAddedMessage.php:37
‪TYPO3\CMS\Install\Updates\UpgradeWizardRegistry\hasUpgradeWizard
‪hasUpgradeWizard(string $identifier)
Definition: UpgradeWizardRegistry.php:37