本文整理汇总了PHP中TYPO3\Flow\Core\Bootstrap::getEnvironmentConfigurationSetting方法的典型用法代码示例。如果您正苦于以下问题:PHP Bootstrap::getEnvironmentConfigurationSetting方法的具体用法?PHP Bootstrap::getEnvironmentConfigurationSetting怎么用?PHP Bootstrap::getEnvironmentConfigurationSetting使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\Flow\Core\Bootstrap
的用法示例。
在下文中一共展示了Bootstrap::getEnvironmentConfigurationSetting方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildForm
/**
* Returns the form definitions for the step
*
* @param \TYPO3\Form\Core\Model\FormDefinition $formDefinition
* @return void
*/
protected function buildForm(\TYPO3\Form\Core\Model\FormDefinition $formDefinition)
{
$page1 = $formDefinition->createPage('page1');
$page1->setRenderingOption('header', 'Setup complete');
$congratulations = $page1->createElement('congratulationsSection', 'TYPO3.Form:Section');
$congratulations->setLabel('Congratulations');
$success = $congratulations->createElement('success', 'TYPO3.Form:StaticText');
$success->setProperty('text', 'You have successfully installed Neos! If you need help getting started, please refer to the Neos documentation.');
$success->setProperty('elementClassAttribute', 'alert alert-success');
$docs = $congratulations->createElement('docsLink', 'TYPO3.Setup:LinkElement');
$docs->setLabel('Read the documentation');
$docs->setProperty('href', 'https://neos.readthedocs.org/');
$docs->setProperty('target', '_blank');
$contextEnv = \TYPO3\Flow\Core\Bootstrap::getEnvironmentConfigurationSetting('FLOW_CONTEXT') ?: 'Development';
$applicationContext = new ApplicationContext($contextEnv);
if (!$applicationContext->isProduction()) {
$context = $page1->createElement('contextSection', 'TYPO3.Form:Section');
$context->setLabel('Define application context');
$contextInfo = $context->createElement('contextInfo', 'TYPO3.Form:StaticText');
$contextInfo->setProperty('text', 'Your Neos installation is currently not running in "Production" context. If you want to experience Neos with its full speed, you should now change your FLOW_CONTEXT environment variable to "Production".');
$contextDocs = $context->createElement('contextDocsLink', 'TYPO3.Setup:LinkElement');
$contextDocs->setLabel('Read about application contexts');
$contextDocs->setProperty('href', 'http://flowframework.readthedocs.org/en/stable/TheDefinitiveGuide/PartIII/Bootstrapping.html#the-typo3-flow-application-context');
$contextDocs->setProperty('target', '_blank');
}
$frontend = $page1->createElement('frontendSection', 'TYPO3.Form:Section');
$frontend->setLabel('View the site');
$link = $frontend->createElement('link', 'TYPO3.Setup:LinkElement');
$link->setLabel('Go to the frontend');
$link->setProperty('href', '/');
$link->setProperty('elementClassAttribute', 'btn btn-large btn-primary');
$backend = $page1->createElement('backendSection', 'TYPO3.Form:Section');
$backend->setLabel('Start editing');
$backendLink = $backend->createElement('backendLink', 'TYPO3.Setup:LinkElement');
$backendLink->setLabel('Go to the backend');
$backendLink->setProperty('href', '/neos');
$backendLink->setProperty('elementClassAttribute', 'btn btn-large btn-primary');
$loggedOut = $page1->createElement('loggedOut', 'TYPO3.Form:StaticText');
$loggedOut->setProperty('text', 'You have automatically been logged out for security reasons since this is the final step. Refresh the page to log in again if you missed something.');
$loggedOut->setProperty('elementClassAttribute', 'alert alert-info');
}
示例2: isset
<?php
/*
* This file is part of the TYPO3.Flow package.
*
* (c) Contributors of the Neos Project - www.neos.io
*
* This package is Open Source Software. For the full copyright and license
* information, please view the LICENSE file which was distributed with this
* source code.
*/
$rootPath = isset($_SERVER['FLOW_ROOTPATH']) ? $_SERVER['FLOW_ROOTPATH'] : false;
if ($rootPath === false && isset($_SERVER['REDIRECT_FLOW_ROOTPATH'])) {
$rootPath = $_SERVER['REDIRECT_FLOW_ROOTPATH'];
}
if ($rootPath === false) {
$rootPath = dirname(__FILE__) . '/../';
} elseif (substr($rootPath, -1) !== '/') {
$rootPath .= '/';
}
require $rootPath . 'Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Core/Bootstrap.php';
$context = \TYPO3\Flow\Core\Bootstrap::getEnvironmentConfigurationSetting('FLOW_CONTEXT') ?: 'Development';
$bootstrap = new \TYPO3\Flow\Core\Bootstrap($context);
$bootstrap->run();
示例3: isRewriteEnabled
/**
* Whether or not URL rewriting is enabled.
*
* @return boolean
*/
public function isRewriteEnabled()
{
return (bool) Bootstrap::getEnvironmentConfigurationSetting('FLOW_REWRITEURLS');
}