Skip to content

Commit

Permalink
[BUGFIX] Fix link in Admin Module (#273)
Browse files Browse the repository at this point in the history
resolves #110
  • Loading branch information
linawolf authored May 22, 2024
1 parent dd9b9eb commit 85f36eb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Classes/Controller/AdminModuleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Backend\Attribute\AsController;
use TYPO3\CMS\Backend\Routing\UriBuilder;
use TYPO3\CMS\Backend\Template\Components\ButtonBar;
use TYPO3\CMS\Backend\Template\ModuleTemplate;
use TYPO3\CMS\Backend\Template\ModuleTemplateFactory;
Expand All @@ -32,6 +33,7 @@
public function __construct(
protected ModuleTemplateFactory $moduleTemplateFactory,
protected IconFactory $iconFactory,
private UriBuilder $uriBuilder,
// ...
) {}

Expand Down Expand Up @@ -89,8 +91,9 @@ private function setUpDocHeader(
ModuleTemplate $view,
): void {
$buttonBar = $view->getDocHeaderComponent()->getButtonBar();
$uriBuilderPath = $this->uriBuilder->buildUriFromRoute('web_list', ['id' => 0]);
$list = $buttonBar->makeLinkButton()
->setHref('<uri-builder-path>')
->setHref($uriBuilderPath)
->setTitle('A Title')
->setShowLabelText(true)
->setIcon($this->iconFactory->getIcon('actions-extension-import', IconSize::SMALL->value));
Expand Down

0 comments on commit 85f36eb

Please sign in to comment.