‪TYPO3CMS  9.5
UpdateScriptController.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
20 
26 {
33  {
34  if (‪$view instanceof ‪BackendTemplateView) {
36  parent::initializeView(‪$view);
37  $this->‪generateMenu();
39  }
40  }
41 
48  public function ‪showAction($extensionKey)
49  {
51  $updateScriptUtility = $this->objectManager->get(\‪TYPO3\CMS\Extensionmanager\Utility\UpdateScriptUtility::class);
52  $updateScriptResult = $updateScriptUtility->executeUpdateIfNeeded($extensionKey);
53  $this->view
54  ->assign('updateScriptResult', $updateScriptResult)
55  ->assign('extensionKey', $extensionKey);
56  }
57 
63  protected function ‪registerDocheaderButtons()
64  {
66  $buttonBar = $this->view->getModuleTemplate()->getDocHeaderComponent()->getButtonBar();
67 
68  ‪$uriBuilder = $this->controllerContext->getUriBuilder();
69 
70  $uri = ‪$uriBuilder->reset()->uriFor('index', [], 'List');
71  $title = $this->‪translate('extConfTemplate.backToList');
72  $icon = $this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-view-go-back', ‪Icon::SIZE_SMALL);
73  $button = $buttonBar->makeLinkButton()
74  ->setHref($uri)
75  ->setTitle($title)
76  ->setIcon($icon);
77  $buttonBar->addButton($button, ‪ButtonBar::BUTTON_POSITION_LEFT);
78  }
79 }
‪TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL
‪const SIZE_SMALL
Definition: Icon.php:29
‪TYPO3\CMS\Backend\Template\Components\ButtonBar\BUTTON_POSITION_LEFT
‪const BUTTON_POSITION_LEFT
Definition: ButtonBar.php:35
‪TYPO3\CMS\Extensionmanager\Controller\AbstractController\translate
‪string null translate($key, $arguments=null)
Definition: AbstractController.php:41
‪TYPO3\CMS\Backend\Template\Components\ButtonBar
Definition: ButtonBar.php:31
‪TYPO3\CMS\Extensionmanager\Controller\AbstractModuleController
Definition: AbstractModuleController.php:25
‪TYPO3\CMS\Extensionmanager\Controller\UpdateScriptController
Definition: UpdateScriptController.php:26
‪TYPO3\CMS\Extbase\Mvc\Controller\AbstractController\$uriBuilder
‪TYPO3 CMS Extbase Mvc Web Routing UriBuilder $uriBuilder
Definition: AbstractController.php:37
‪TYPO3\CMS\Core\Imaging\Icon
Definition: Icon.php:25
‪TYPO3\CMS\Extensionmanager\Controller\UpdateScriptController\initializeView
‪initializeView(ViewInterface $view)
Definition: UpdateScriptController.php:32
‪TYPO3
‪TYPO3\CMS\Extensionmanager\Controller\AbstractModuleController\generateMenu
‪generateMenu()
Definition: AbstractModuleController.php:58
‪TYPO3\CMS\Extensionmanager\Controller
Definition: AbstractController.php:2
‪TYPO3\CMS\Extbase\Mvc\View\ViewInterface
Definition: ViewInterface.php:21
‪TYPO3\CMS\Backend\View\BackendTemplateView
Definition: BackendTemplateView.php:27
‪TYPO3\CMS\Extensionmanager\Controller\UpdateScriptController\showAction
‪showAction($extensionKey)
Definition: UpdateScriptController.php:48
‪TYPO3\CMS\Extensionmanager\Controller\AbstractModuleController\$view
‪BackendTemplateView $view
Definition: AbstractModuleController.php:30
‪TYPO3\CMS\Extensionmanager\Controller\UpdateScriptController\registerDocheaderButtons
‪registerDocheaderButtons()
Definition: UpdateScriptController.php:63