TYPO3 CMS  TYPO3_6-2
DistributionController.php
Go to the documentation of this file.
1 <?php
3 
22 
27  protected $packageManager;
28 
34  public function showAction(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension $extension) {
35  $extensionKey = $extension->getExtensionKey();
36  // Check if extension/package is installed
37  $active = $this->packageManager->isPackageActive($extensionKey);
38 
39  // Create link for extension configuration
40  if ($active && file_exists(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($extensionKey) . 'ext_conf_template.txt')) {
41  $uriBuilder = $this->controllerContext->getUriBuilder();
42  $action = 'showConfigurationForm';
43  $configurationLink = $uriBuilder->reset()->uriFor(
44  $action,
45  array('extension' => array('key' => $extensionKey)),
46  'Configuration'
47  );
48  } else {
49  $configurationLink = FALSE;
50  }
51  $this->view->assign('distributionActive', $active);
52  $this->view->assign('configurationLink', $configurationLink);
53  $this->view->assign('extension', $extension);
54  }
55 }
showAction(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension $extension)