‪TYPO3CMS  10.4
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'] == $key) {
54  $type = $value['type'];
55  }
56  return $type;
57  }
58 
64  protected function ‪setErrorParams($value)
65  {
66  $this->errorParams = $value;
67  }
68 
74  public function ‪getErrorParams()
75  {
76  return ‪$this->errorParams;
77  }
78 
85  public function ‪getBrokenUrl($row)
86  {
87  return $row['url'];
88  }
89 
93  protected function ‪getLanguageService()
94  {
95  return ‪$GLOBALS['LANG'];
96  }
97 }
‪TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype\$errorParams
‪array $errorParams
Definition: AbstractLinktype.php:29
‪TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype\getLanguageService
‪LanguageService getLanguageService()
Definition: AbstractLinktype.php:92
‪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:5
‪TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype\getErrorParams
‪array getErrorParams()
Definition: AbstractLinktype.php:73
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:42
‪TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype\getBrokenUrl
‪string getBrokenUrl($row)
Definition: AbstractLinktype.php:84
‪TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype\fetchType
‪string fetchType($value, $type, $key)
Definition: AbstractLinktype.php:50