TYPO3 CMS  TYPO3_6-2
ConfigureExtensionViewHelper.php
Go to the documentation of this file.
1 <?php
3 
22 
26  protected $tagName = 'a';
27 
36  public function render($extension, $forceConfiguration = TRUE, $showDescription = FALSE) {
37  $content = (string)$this->renderChildren();
38  if ($extension['installed'] && file_exists(PATH_site . $extension['siteRelPath'] . 'ext_conf_template.txt')) {
39  $uriBuilder = $this->controllerContext->getUriBuilder();
40  $action = 'showConfigurationForm';
41  $uri = $uriBuilder->reset()->uriFor(
42  $action,
43  array('extension' => array('key' => $extension['key'])),
44  'Configuration'
45  );
46  if ($showDescription) {
47  $title = $extension['description'] . PHP_EOL .
48  \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('extensionList.clickToConfigure', 'extensionmanager');
49 
50  } else {
51  $title = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('extensionList.configure', 'extensionmanager');
52  }
53  $this->tag->addAttribute('href', $uri);
54  $this->tag->addAttribute('title', $title);
55  $this->tag->setContent($content);
56  $content = $this->tag->render();
57  } elseif ($forceConfiguration) {
58  $content = '';
59  }
60 
61  return $content;
62  }
63 
64 }
static translate($key, $extensionName, $arguments=NULL)
render($extension, $forceConfiguration=TRUE, $showDescription=FALSE)