diff --git a/Classes/Analyzers/AbstractAnalyzer.php b/Classes/Analyzers/AbstractAnalyzer.php index 080e850..e41784d 100644 --- a/Classes/Analyzers/AbstractAnalyzer.php +++ b/Classes/Analyzers/AbstractAnalyzer.php @@ -18,7 +18,7 @@ abstract class AbstractAnalyzer implements AnalyzerInterface { final const TYPE_INTERNAL = 'internal'; - protected string $type = ''; + protected $type = ''; /** * @var array diff --git a/Classes/Command/PresetByPageUidCommand.php b/Classes/Command/PresetByPageUidCommand.php index ea77c45..4e73480 100644 --- a/Classes/Command/PresetByPageUidCommand.php +++ b/Classes/Command/PresetByPageUidCommand.php @@ -3,6 +3,7 @@ declare(strict_types=1); namespace UniWue\UwA11yCheck\Command; +use TYPO3\CMS\Extbase\Object\ObjectManager; use UniWue\UwA11yCheck\Check\Preset; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; @@ -10,7 +11,6 @@ use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Object\ObjectManager; use UniWue\UwA11yCheck\Check\Result\Impact; use UniWue\UwA11yCheck\Check\ResultSet; use UniWue\UwA11yCheck\Service\PresetService; diff --git a/Classes/Controller/A11yCheckController.php b/Classes/Controller/A11yCheckController.php index e59c169..a893c11 100644 --- a/Classes/Controller/A11yCheckController.php +++ b/Classes/Controller/A11yCheckController.php @@ -17,7 +17,10 @@ use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Extbase\Mvc\View\ViewInterface; use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder; +use TYPO3\CMS\Extbase\Object\ObjectManager; use TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter; +use TYPO3\CMS\Extbase\Utility\DebuggerUtility; +use TYPO3\CMS\Fluid\View\TemplateView; use UniWue\UwA11yCheck\Domain\Model\Dto\CheckDemand; use UniWue\UwA11yCheck\Service\PresetService; use UniWue\UwA11yCheck\Service\ResultsService; @@ -70,10 +73,10 @@ protected function initializeView(ViewInterface $view): void parent::initializeView($view); $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class); - $this->resultsService = $this->objectManager->get(ResultsService::class); + $this->resultsService =GeneralUtility::makeInstance(ObjectManager::class)->get(ResultsService::class); $moduleTemplate->setFlashMessageQueue($this->controllerContext->getFlashMessageQueue()); - if ($view instanceof BackendTemplateView) { + if ($view instanceof TemplateView) { $moduleTemplate->getPageRenderer()->addCssFile( 'EXT:uw_a11y_check/Resources/Public/Css/a11y_check.css' ); @@ -94,10 +97,9 @@ public function initializeAction(): void /** * Index action * - * @param CheckDemand $checkDemand * @IgnoreValidation("checkDemand") */ - public function indexAction($checkDemand = null): ResponseInterface + public function indexAction(CheckDemand $checkDemand = null): ResponseInterface { $moduleTemplate = $this->moduleTemplateFactory->create($this->request); if ($checkDemand === null) { @@ -115,7 +117,6 @@ public function indexAction($checkDemand = null): ResponseInterface ] ); } - $this->view->assignMultiple([ 'checkDemand' => $checkDemand, 'presets' => $this->presetService->getPresets(), @@ -197,7 +198,7 @@ public function acknowledgeResultAction(int $pageUid): ResponseInterface protected function createMenu(): void { $moduleTemplate = $this->moduleTemplateFactory->create($this->request); - $uriBuilder = $this->objectManager->get(UriBuilder::class); + $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class); $uriBuilder->setRequest($this->request); $menu = $moduleTemplate->getDocHeaderComponent()->getMenuRegistry()->makeMenu(); @@ -229,8 +230,8 @@ protected function createDefaultButtons(): void // Shortcut if ($this->getBackendUser()->mayMakeShortcut()) { $shortcutButton = $buttonBar->makeShortcutButton() - ->setModuleName('web_UwA11yCheckTxUwa11ycheckM1') - ->setGetVariables(['route', 'module', 'id']) + ->setRouteIdentifier('web_UwA11yCheckTxUwa11ycheckM1') + ->setArguments(['route', 'module', 'id']) ->setDisplayName('Shortcut'); $buttonBar->addButton($shortcutButton, ButtonBar::BUTTON_POSITION_RIGHT); } diff --git a/Classes/Controller/ContentElementsController.php b/Classes/Controller/ContentElementsController.php index b9c3e97..ab413d8 100644 --- a/Classes/Controller/ContentElementsController.php +++ b/Classes/Controller/ContentElementsController.php @@ -34,7 +34,7 @@ public function showAction(int $pageUid, string $ignoreContentTypes, string $hma $expectedHmac = GeneralUtility::hmac($hmacString, 'page_content'); if ($expectedHmac !== $hmac) { - throw new Exception('HMAC does not match', 1_572_608_738_828); + throw new Exception('HMAC does not match', 1572608738828); } $whereCondition = 'colPos >= 0'; diff --git a/Classes/Property/TypeConverter/PresetTypeConverter.php b/Classes/Property/TypeConverter/PresetTypeConverter.php index f2def8c..a806b9f 100644 --- a/Classes/Property/TypeConverter/PresetTypeConverter.php +++ b/Classes/Property/TypeConverter/PresetTypeConverter.php @@ -2,6 +2,7 @@ namespace UniWue\UwA11yCheck\Property\TypeConverter; +use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Extbase\Error\Error; use TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationInterface; use TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter; @@ -53,7 +54,7 @@ public function convertFrom( $preset = $this->presetService->getPresetById($source); if (!$preset instanceof Preset) { - return $this->objectManager->get(Error::class, 'Preset not found', 1_573_053_017_102); + return GeneralUtility::makeInstance(Error::class, 'Preset not found', 1573053017102); } return $preset; diff --git a/Classes/Tests/AbstractTest.php b/Classes/Tests/AbstractTest.php index 20b2fe5..8392f9f 100644 --- a/Classes/Tests/AbstractTest.php +++ b/Classes/Tests/AbstractTest.php @@ -13,15 +13,15 @@ */ abstract class AbstractTest implements TestInterface { - protected string $id = ''; + protected $id = ''; - protected string $description = ''; + protected $description = ''; - protected string $help = ''; + protected $help = ''; - protected string $helpUrl = ''; + protected $helpUrl = ''; - protected int $impact = 0; + protected $impact = 0; public function getId(): string { diff --git a/Resources/Private/Partials/Results.html b/Resources/Private/Partials/Results.html index 430c139..3ddba59 100644 --- a/Resources/Private/Partials/Results.html +++ b/Resources/Private/Partials/Results.html @@ -11,7 +11,7 @@