Files
VITEC-website/packages/vitec/Classes/Controller/SolutionController.php
Oliver Rasche 12eb40614b Unify list plugins, add solution list and per-story detail page
- vitec_usecaselist: layout + record selection like marketlist
- new plugin vitec_solutionlist (spec 7.13.3, key "solutions")
- tx_vitec_domain_model_usecase: detail_page -> resolved detailUrl
  (also gives story cards in vitec_modelcard a link for the first time)
- "Show Toolbar" checkbox on product/market/solution/usecase lists
- spec bumped to v1.9

BREAKING: vitec_productlist and vitec_usecaselist now emit an object
instead of a bare array. Consumers must read products.products and
usecases.usecases. Also found: productlist had a configurable layout
that was never serialised; it is emitted now, but keeps its own 0-3
vocabulary instead of grid/list/carousel.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-17 16:29:06 +02:00

74 lines
1.7 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
*/
/**
* action list
*
* Intentionally empty: in headless mode the JSON is produced by
* SolutionListJsonRenderer through TypoScript, so this action never runs.
* It exists because configurePlugin() needs a target - same as
* MarketController::listAction().
*/
public function listAction(): ResponseInterface
{
return $this->htmlResponse();
}
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();
}
}