Skip to content

Commit

Permalink
[BUGFIX] Fix link in Admin Module
Browse files Browse the repository at this point in the history
resolves #110
  • Loading branch information
linawolf committed May 4, 2024
1 parent 7c78ff6 commit c8c1889
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 c8c1889

Please sign in to comment.