TYPO3 CMS  TYPO3_6-2
ModuleRunner.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\CMS\Extbase\Core;
3 
21 
26  protected $objectManager;
27 
37  public function callModule($moduleSignature) {
38  if (!isset($GLOBALS['TBE_MODULES']['_configuration'][$moduleSignature])) {
39  return FALSE;
40  }
41  $moduleConfiguration = $GLOBALS['TBE_MODULES']['_configuration'][$moduleSignature];
42 
43  // Check permissions and exit if the user has no permission for entry
44  $GLOBALS['BE_USER']->modAccess($moduleConfiguration, TRUE);
46  if ($id && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($id)) {
47  // Check page access
48  $permClause = $GLOBALS['BE_USER']->getPagePermsClause(TRUE);
49  $access = is_array(\TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess((int)$id, $permClause));
50  if (!$access) {
51  throw new \RuntimeException('You don\'t have access to this page', 1289917924);
52  }
53  }
54 
55  // BACK_PATH is the path from the typo3/ directory from within the
56  // directory containing the controller file. We are using mod.php dispatcher
57  // and thus we are already within typo3/ because we call typo3/mod.php
58  $GLOBALS['BACK_PATH'] = '';
59  $configuration = array(
60  'extensionName' => $moduleConfiguration['extensionName'],
61  'pluginName' => $moduleSignature
62  );
63  if (isset($moduleConfiguration['vendorName'])) {
64  $configuration['vendorName'] = $moduleConfiguration['vendorName'];
65  }
66 
67  $bootstrap = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Core\\BootstrapInterface');
68  $content = $bootstrap->run('', $configuration);
69  print $content;
70 
71  return TRUE;
72  }
73 }
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]