35 parent::initializeArguments();
36 $this->registerArgument(
'extension',
'array',
'',
true);
46 $extension = $this->arguments[
'extension'];
47 $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
48 if (\
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($extension[
'key'])) {
49 return '<span class="btn btn-default disabled">' . $iconFactory->getIcon(
'empty-empty',
Icon::SIZE_SMALL)->render() .
'</span>';
53 $extension[
'type'] ===
'System'
55 return '<span class="btn btn-default disabled">' . $iconFactory->getIcon(
'empty-empty',
Icon::SIZE_SMALL)->render() .
'</span>';
57 $uriBuilder = $this->renderingContext->getControllerContext()->getUriBuilder();
58 $action =
'removeExtension';
60 $uriBuilder->setFormat(
'json');
61 $uri = $uriBuilder->uriFor($action, [
62 'extension' => $extension[
'key']
64 $this->tag->addAttribute(
'href', $uri);
65 $cssClass =
'removeExtension btn btn-default';
66 $this->tag->addAttribute(
'class', $cssClass);
68 $this->tag->setContent($iconFactory->getIcon(
'actions-edit-delete',
Icon::SIZE_SMALL)->render());
69 return $this->tag->render();