本文整理汇总了PHP中TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadBaseTca方法的典型用法代码示例。如果您正苦于以下问题:PHP ExtensionManagementUtility::loadBaseTca方法的具体用法?PHP ExtensionManagementUtility::loadBaseTca怎么用?PHP ExtensionManagementUtility::loadBaseTca使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Core\Utility\ExtensionManagementUtility
的用法示例。
在下文中一共展示了ExtensionManagementUtility::loadBaseTca方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initTCA
/**
* Makes TCA available inside eID
*
* @return void
*/
public static function initTCA()
{
// Some badly made extensions attempt to manipulate TCA in a wrong way
// (inside ext_localconf.php). Therefore $GLOBALS['TCA'] may become an array
// but in fact it is not loaded. The check below ensure that
// TCA is still loaded if such bad extensions are installed
if (!is_array($GLOBALS['TCA']) || !isset($GLOBALS['TCA']['pages'])) {
ExtensionManagementUtility::loadBaseTca();
}
}
示例2: init
/**
* Load extbase dependencies to use repositories and persistence.
*/
public function init()
{
ExtensionManagementUtility::loadBaseTca(false);
if (!isset($GLOBALS['TSFE']) || empty($GLOBALS['TSFE']->sys_page)) {
$GLOBALS['TSFE']->sys_page = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('t3lib_pageSelect');
}
if (!isset($GLOBALS['TSFE']) || empty($GLOBALS['TSFE']->tmpl)) {
$GLOBALS['TSFE']->tmpl = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('t3lib_tstemplate');
}
}
示例3: loadExtensionTables
/**
* Load ext_tables and friends.
*
* This will mainly set up $TCA and several other global arrays
* through API's like extMgm.
* Executes ext_tables.php files of loaded extensions or the
* according cache file if exists.
*
* @param bool $allowCaching True, if reading compiled ext_tables file from cache is allowed
* @return Bootstrap
* @internal This is not a public API method, do not use in own extensions
*/
public function loadExtensionTables($allowCaching = true)
{
ExtensionManagementUtility::loadBaseTca($allowCaching);
ExtensionManagementUtility::loadExtTables($allowCaching);
$this->runExtTablesPostProcessingHooks();
return $this;
}
示例4: loadBaseTcaCreatesCacheFileWithContentOfAnExtensionsConfigurationTcaPhpFile
/**
* @test
*/
public function loadBaseTcaCreatesCacheFileWithContentOfAnExtensionsConfigurationTcaPhpFile()
{
$extensionName = $this->getUniqueId('test_baseTca_');
$packageManager = $this->createMockPackageManagerWithMockPackage($extensionName);
$packagePath = $packageManager->getPackage($extensionName)->getPackagePath();
GeneralUtility::mkdir($packagePath);
GeneralUtility::mkdir($packagePath . 'Configuration/');
GeneralUtility::mkdir($packagePath . 'Configuration/TCA/');
$GLOBALS['TYPO3_LOADED_EXT'] = new LoadedExtensionsArray($packageManager);
ExtensionManagementUtility::setPackageManager($packageManager);
$uniqueTableName = $this->getUniqueId('table_name_');
$uniqueStringInTableConfiguration = $this->getUniqueId('table_configuration_');
$tableConfiguration = '<?php return array(\'foo\' => \'' . $uniqueStringInTableConfiguration . '\'); ?>';
file_put_contents($packagePath . 'Configuration/TCA/' . $uniqueTableName . '.php', $tableConfiguration);
$mockCache = $this->getMock(AbstractFrontend::class, array('getIdentifier', 'set', 'get', 'getByTag', 'has', 'remove', 'flush', 'flushByTag', 'requireOnce'), array(), '', FALSE);
/** @var CacheManager|\PHPUnit_Framework_MockObject_MockObject $mockCacheManager */
$mockCacheManager = $this->getMock(CacheManager::class, array('getCache'));
$mockCacheManager->expects($this->any())->method('getCache')->will($this->returnValue($mockCache));
ExtensionManagementUtilityAccessibleProxy::setCacheManager($mockCacheManager);
$mockCache->expects($this->once())->method('has')->will($this->returnValue(FALSE));
$mockCache->expects($this->once())->method('set')->with($this->anything(), $this->stringContains($uniqueStringInTableConfiguration), $this->anything());
ExtensionManagementUtility::loadBaseTca(TRUE);
}
示例5: tryToLoadExtLocalconfAndExtTablesOfExtensions
/**
* Tries to load the ext_localconf and ext_tables files of all non-core extensions
* Writes current extension name to file and deletes it again when inclusion was
* successful.
*
* @param array $extensions
* @return void
*/
protected function tryToLoadExtLocalconfAndExtTablesOfExtensions(array $extensions)
{
foreach ($extensions as $extensionKey => $extension) {
$this->writeCurrentExtensionToFile($extensionKey);
$this->loadExtLocalconfForExtension($extensionKey, $extension);
$this->removeCurrentExtensionFromFile($extensionKey);
}
ExtensionManagementUtility::loadBaseTca(false);
foreach ($extensions as $extensionKey => $extension) {
$this->writeCurrentExtensionToFile($extensionKey);
$this->loadExtTablesForExtension($extensionKey, $extension);
$this->removeCurrentExtensionFromFile($extensionKey);
}
}
示例6: loadExtensionTables
/**
* Load ext_tables and friends.
*
* This will mainly set up $TCA and several other global arrays
* through API's like extMgm.
* Executes ext_tables.php files of loaded extensions or the
* according cache file if exists.
*
* @param boolean $allowCaching True, if reading compiled ext_tables file from cache is allowed
* @return Bootstrap
* @internal This is not a public API method, do not use in own extensions
*/
public function loadExtensionTables($allowCaching = TRUE)
{
Utility\ExtensionManagementUtility::loadBaseTca($allowCaching);
Utility\ExtensionManagementUtility::loadExtTables($allowCaching);
$this->executeExtTablesAdditionalFile();
$this->runExtTablesPostProcessingHooks();
return $this;
}
示例7: handleRequest
/**
* Handles a frontend request
*
* @param \Psr\Http\Message\ServerRequestInterface $request
* @return NULL|\Psr\Http\Message\ResponseInterface
*/
public function handleRequest(\Psr\Http\Message\ServerRequestInterface $request)
{
$response = null;
$this->request = $request;
$this->initializeTimeTracker();
// Hook to preprocess the current request:
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preprocessRequest'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preprocessRequest'] as $hookFunction) {
$hookParameters = [];
GeneralUtility::callUserFunction($hookFunction, $hookParameters, $hookParameters);
}
unset($hookFunction);
unset($hookParameters);
}
$this->initializeController();
if ($GLOBALS['TYPO3_CONF_VARS']['FE']['pageUnavailable_force'] && !GeneralUtility::cmpIP(GeneralUtility::getIndpEnv('REMOTE_ADDR'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask'])) {
$this->controller->pageUnavailableAndExit('This page is temporarily unavailable.');
}
$this->controller->connectToDB();
$this->controller->sendRedirect();
// Output compression
// Remove any output produced until now
$this->bootstrap->endOutputBufferingAndCleanPreviousOutput();
$this->initializeOutputCompression();
// Initializing the Frontend User
$this->timeTracker->push('Front End user initialized', '');
$this->controller->initFEuser();
$this->timeTracker->pull();
// Initializing a possible logged-in Backend User
/** @var $GLOBALS['BE_USER'] \TYPO3\CMS\Backend\FrontendBackendUserAuthentication */
$GLOBALS['BE_USER'] = $this->controller->initializeBackendUser();
// Process the ID, type and other parameters.
// After this point we have an array, $page in TSFE, which is the page-record
// of the current page, $id.
$this->timeTracker->push('Process ID', '');
// Initialize admin panel since simulation settings are required here:
if ($this->controller->isBackendUserLoggedIn()) {
$GLOBALS['BE_USER']->initializeAdminPanel();
$this->bootstrap->initializeBackendRouter()->loadExtensionTables();
} else {
ExtensionManagementUtility::loadBaseTca();
}
$this->controller->checkAlternativeIdMethods();
$this->controller->clear_preview();
$this->controller->determineId();
// Now, if there is a backend user logged in and he has NO access to this page,
// then re-evaluate the id shown! _GP('ADMCMD_noBeUser') is placed here because
// \TYPO3\CMS\Version\Hook\PreviewHook might need to know if a backend user is logged in.
if ($this->controller->isBackendUserLoggedIn() && (!$GLOBALS['BE_USER']->extPageReadAccess($this->controller->page) || GeneralUtility::_GP('ADMCMD_noBeUser'))) {
// Remove user
unset($GLOBALS['BE_USER']);
$this->controller->beUserLogin = false;
// Re-evaluate the page-id.
$this->controller->checkAlternativeIdMethods();
$this->controller->clear_preview();
$this->controller->determineId();
}
$this->controller->makeCacheHash();
$this->timeTracker->pull();
// Admin Panel & Frontend editing
if ($this->controller->isBackendUserLoggedIn()) {
$GLOBALS['BE_USER']->initializeFrontendEdit();
if ($GLOBALS['BE_USER']->adminPanel instanceof AdminPanelView) {
$this->bootstrap->initializeLanguageObject();
}
if ($GLOBALS['BE_USER']->frontendEdit instanceof FrontendEditingController) {
$GLOBALS['BE_USER']->frontendEdit->initConfigOptions();
}
}
// Starts the template
$this->timeTracker->push('Start Template', '');
$this->controller->initTemplate();
$this->timeTracker->pull();
// Get from cache
$this->timeTracker->push('Get Page from cache', '');
$this->controller->getFromCache();
$this->timeTracker->pull();
// Get config if not already gotten
// After this, we should have a valid config-array ready
$this->controller->getConfigArray();
// Setting language and locale
$this->timeTracker->push('Setting language and locale', '');
$this->controller->settingLanguage();
$this->controller->settingLocale();
$this->timeTracker->pull();
// Convert POST data to utf-8 for internal processing if metaCharset is different
$this->controller->convPOSTCharset();
$this->controller->initializeRedirectUrlHandlers();
$this->controller->handleDataSubmission();
// Check for shortcut page and redirect
$this->controller->checkPageForShortcutRedirect();
$this->controller->checkPageForMountpointRedirect();
// Generate page
$this->controller->setUrlIdToken();
//.........这里部分代码省略.........