| Total Complexity | 5 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | class SysLogButtonProvider implements ButtonProviderInterface |
||
| 31 | { |
||
| 32 | /** |
||
| 33 | * @var string |
||
| 34 | */ |
||
| 35 | private $title; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @var string |
||
| 39 | */ |
||
| 40 | private $target; |
||
| 41 | |||
| 42 | public function __construct(string $title, string $target = '') |
||
| 43 | { |
||
| 44 | $this->title = $title; |
||
| 45 | $this->target = $target; |
||
| 46 | } |
||
| 47 | |||
| 48 | public function getTitle(): string |
||
| 49 | { |
||
| 50 | return $this->title; |
||
| 51 | } |
||
| 52 | |||
| 53 | public function getLink(): string |
||
| 54 | { |
||
| 55 | if (ExtensionManagementUtility::isLoaded('belog')) { |
||
| 56 | $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class); |
||
| 57 | return (string)$uriBuilder->buildUriFromRoute( |
||
| 58 | 'system_BelogLog', |
||
| 59 | ['tx_belog_system_beloglog[constraint][action]' => -1] |
||
| 60 | ); |
||
| 61 | } |
||
| 62 | |||
| 63 | return ''; |
||
| 64 | } |
||
| 65 | |||
| 66 | public function getTarget(): string |
||
| 69 | } |
||
| 70 | } |
||
| 71 |