‪TYPO3CMS  11.5
AbstractLinkHandler.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 
21 use TYPO3\CMS\Core\Page\PageRenderer;
24 use TYPO3Fluid\Fluid\View\ViewInterface;
25 
31 abstract class ‪AbstractLinkHandler
32 {
40  protected ‪$linkAttributes = ['target', 'title', 'class', 'params', 'rel'];
41 
45  protected ‪$updateSupported = true;
46 
50  protected ‪$linkBrowser;
51 
55  protected ‪$iconFactory;
56 
60  protected ‪$view;
61 
65  protected ‪$pageRenderer;
66 
70  public function ‪__construct() {}
71 
79  public function ‪initialize(‪AbstractLinkBrowserController ‪$linkBrowser, $identifier, array $configuration)
80  {
81  $this->linkBrowser = ‪$linkBrowser;
82  $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
83  $this->pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
84  }
85 
89  public function ‪getLinkAttributes()
90  {
92  }
93 
98  public function ‪modifyLinkAttributes(array $fieldDefinitions)
99  {
100  return $fieldDefinitions;
101  }
102 
110  public function ‪isUpdateSupported()
111  {
113  }
114 
118  protected function ‪getBackendUser()
119  {
120  return ‪$GLOBALS['BE_USER'];
121  }
122 
126  protected function ‪getLanguageService()
127  {
128  return ‪$GLOBALS['LANG'];
129  }
130 
131  public function ‪setView(ViewInterface ‪$view): void
132  {
133  $this->view = ‪$view;
134  }
135 }
‪TYPO3\CMS\Core\Imaging\IconFactory
Definition: IconFactory.php:34
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
Definition: BackendUserAuthentication.php:62
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:42
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:50