‪TYPO3CMS  11.5
AbstractLinktype.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 
19 
23 abstract class ‪AbstractLinktype implements ‪LinktypeInterface
24 {
30  protected ‪$errorParams = [];
31 
38  public function ‪setAdditionalConfig(array $config): void
39  {
40  // do nothing by default
41  }
42 
51  public function ‪fetchType($value, $type, $key)
52  {
53  if (($value['type'] ?? false) == $key) {
54  $type = $value['type'];
55  }
56  return $type;
57  }
58 
64  protected function ‪setErrorParams($value)
65  {
66  $this->errorParams = $value;
67  }
68 
75  public function ‪getErrorParams()
76  {
77  return ‪$this->errorParams;
78  }
79 
86  public function ‪getBrokenUrl($row)
87  {
88  return $row['url'];
89  }
90 
94  protected function ‪getLanguageService()
95  {
96  return ‪$GLOBALS['LANG'];
97  }
98 }
‪TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype\$errorParams
‪array $errorParams
Definition: AbstractLinktype.php:29
‪TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype\getLanguageService
‪LanguageService getLanguageService()
Definition: AbstractLinktype.php:93
‪TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype
Definition: AbstractLinktype.php:24
‪TYPO3\CMS\Linkvalidator\Linktype\LinktypeInterface
Definition: LinktypeInterface.php:22
‪TYPO3\CMS\Linkvalidator\Linktype
Definition: AbstractLinktype.php:16
‪TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype\setErrorParams
‪setErrorParams($value)
Definition: AbstractLinktype.php:63
‪TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype\setAdditionalConfig
‪setAdditionalConfig(array $config)
Definition: AbstractLinktype.php:37
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype\getErrorParams
‪array getErrorParams()
Definition: AbstractLinktype.php:74
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:42
‪TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype\getBrokenUrl
‪string getBrokenUrl($row)
Definition: AbstractLinktype.php:85
‪TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype\fetchType
‪string fetchType($value, $type, $key)
Definition: AbstractLinktype.php:50