2 namespace TYPO3\CMS\Extensionmanager\ViewHelpers;
49 public function render(\TYPO3\CMS\Extensionmanager\Domain\Model\
Extension $extension)
51 $installPaths = \TYPO3\CMS\Extensionmanager\Domain\Model\Extension::returnAllowedInstallPaths();
52 if (empty($installPaths)) {
55 $pathSelector =
'<ul class="is-hidden">';
56 foreach ($installPaths as $installPathType => $installPath) {
57 $pathSelector .=
'<li>
58 <input type="radio" id="' . htmlspecialchars($extension->getExtensionKey()) .
'-downloadPath-' . htmlspecialchars($installPathType) .
'" name="' . htmlspecialchars($this->
getFieldNamePrefix(
'downloadPath')) .
'[downloadPath]" class="downloadPath" value="' . htmlspecialchars($installPathType) .
'"' . ($installPathType ==
'Local' ?
' checked="checked"' :
'') .
'/>
59 <label for="' . htmlspecialchars($extension->getExtensionKey()) .
'-downloadPath-' . htmlspecialchars($installPathType) .
'">' . htmlspecialchars($installPathType) .
'</label>
62 $pathSelector .=
'</ul>';
63 $uriBuilder = $this->controllerContext->getUriBuilder();
64 $action =
'checkDependencies';
66 $uriBuilder->setFormat(
'json');
67 $uri = $uriBuilder->uriFor($action, array(
68 'extension' => (
int)$extension->getUid()
70 $this->tag->addAttribute(
'data-href', $uri);
72 $automaticInstallation = $this->configurationUtility->getCurrentConfiguration(
'extensionmanager')[
'automaticInstallation'][
'value'];
73 $labelKeySuffix = $automaticInstallation ?
'' :
'.downloadOnly';
75 <div class="btn-group">
79 class="btn btn-default"
82 <span class="t3-icon fa fa-cloud-download"></span>
86 $this->tag->setContent($label . $pathSelector);
87 $this->tag->addAttribute(
'class',
'download');
88 return '<div id="' . htmlspecialchars($extension->getExtensionKey()) .
'-downloadFromTer" class="downloadFromTer">' . $this->tag->render() .
'</div>';