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