Files
VITEC-website/packages/vitec/Classes/Controller/SolutionController.php
2026-05-18 14:46:25 +02:00

61 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
namespace Evomedien\Vitec\Controller;
use Evomedien\Vitec\Domain\Repository\SolutionRepository;
use Evomedien\Vitec\Domain\Model\Solution;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
use Psr\Http\Message\ResponseInterface;
/**
* This file is part of the "VITEC" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2025
*/
/**
* SolutionController
*/
class SolutionController extends ActionController
{
/**
* solutionRepository
*
* @var SolutionRepository
*/
protected $solutionRepository;
/**
* Constructor
*
* @param SolutionRepository $solutionRepository
*/
public function __construct(SolutionRepository $solutionRepository)
{
$this->solutionRepository = $solutionRepository;
}
/**
* action show
*
* @return ResponseInterface
*/
public function showAction(): ResponseInterface
{
$selectedSolutionId = (int)$this->settings['solution'];
$solution = null;
if ($selectedSolutionId) {
$solution = $this->solutionRepository->findByUid($selectedSolutionId);
}
$this->view->assign('solution', $solution);
return $this->htmlResponse();
}
}