TYPO3 CMS  TYPO3_6-2
ExtensionManager.php
Go to the documentation of this file.
1 <?php
3 
22 
26  static protected $documents = NULL;
27 
32  protected $objectManager;
33 
42  public function processActions(array $extension, array &$actions) {
43  if (static::$documents === NULL) {
45  $documentController = $this->objectManager->get('TYPO3\\CMS\\Documentation\\Controller\\DocumentController');
46  static::$documents = $documentController->getDocuments();
47  }
48 
49  $extensionKey = $extension['key'];
50  $documentKey = 'typo3cms.extensions.' . $extensionKey;
51 
52  if (isset(static::$documents[$documentKey])) {
53  $document = static::$documents[$documentKey];
54 
56  $formatsViewHelper = $this->objectManager->get('TYPO3\\CMS\\Documentation\\ViewHelpers\\FormatsViewHelper');
57 
58  foreach ($document->getTranslations() as $documentTranslation) {
59  $actions[] = $formatsViewHelper->render($documentTranslation);
60  }
61  }
62  }
63 
64 }