本文整理汇总了PHP中TYPO3\CMS\Fluid\View\StandaloneView::getRequest方法的典型用法代码示例。如果您正苦于以下问题:PHP StandaloneView::getRequest方法的具体用法?PHP StandaloneView::getRequest怎么用?PHP StandaloneView::getRequest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Fluid\View\StandaloneView
的用法示例。
在下文中一共展示了StandaloneView::getRequest方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
$this->view = GeneralUtility::makeInstance(StandaloneView::class);
$this->view->getRequest()->setControllerExtensionName('lowlevel');
$this->pageId = (int) GeneralUtility::_GET('id');
$this->urlService = new UrlService();
$this->pageSpeedRepository = new PageSpeedRepository();
$this->configuration = new Configuration();
$this->addScripts();
}
示例2: getDropDown
/**
* Render drop down
*
* @return string Drop down HTML
*/
public function getDropDown()
{
if (!$this->checkAccess()) {
return '';
}
$request = $this->standaloneView->getRequest();
$request->setControllerExtensionName('backend');
$this->standaloneView->assignMultiple(array('installToolUrl' => BackendUtility::getModuleUrl('system_extinstall'), 'messages' => $this->systemMessages, 'count' => $this->totalCount > $this->maximumCountInBadge ? $this->maximumCountInBadge . '+' : $this->totalCount, 'severityBadgeClass' => $this->severityBadgeClass, 'systemInformation' => $this->systemInformation));
return $this->standaloneView->render();
}
示例3: __construct
/**
* @return \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController
*/
public function __construct()
{
$this->getLanguageService()->includeLLFile('EXT:scheduler/Resources/Private/Language/locallang.xlf');
$this->MCONF = array('name' => $this->moduleName);
$this->backPath = $GLOBALS['BACK_PATH'];
$this->cshKey = '_MOD_' . $this->moduleName;
$this->backendTemplatePath = ExtensionManagementUtility::extPath('scheduler') . 'Resources/Private/Templates/Backend/SchedulerModule/';
$this->view = GeneralUtility::makeInstance(\TYPO3\CMS\Fluid\View\StandaloneView::class);
$this->view->getRequest()->setControllerExtensionName('scheduler');
$this->moduleUri = BackendUtility::getModuleUrl($this->moduleName);
}
示例4: renderContent
/**
* renderContent renders sie given Fluidtemplate an adds the given data to the view helper.
* Your templates have to be in "Resources/Private/Html/Content/"
*
* @param array $data Daten für das Fluid-Template
* @param string $templateFile
*
* @return string Content
*/
public function renderContent($data, $templateFile)
{
if (file_exists($templateFile)) {
$this->view->getRequest()->setControllerExtensionName($this->extKey);
$this->view->setTemplatePathAndFilename($templateFile);
$this->view->assign('data', $data);
$content = $this->view->render();
} else {
$content = 'Could not load template!';
}
return $content;
}
示例5: __construct
/**
* @return \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController
*/
public function __construct()
{
$this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
$this->getLanguageService()->includeLLFile('EXT:scheduler/Resources/Private/Language/locallang.xlf');
$this->MCONF = array('name' => $this->moduleName);
$this->cshKey = '_MOD_' . $this->moduleName;
$this->backendTemplatePath = ExtensionManagementUtility::extPath('scheduler') . 'Resources/Private/Templates/Backend/SchedulerModule/';
$this->view = GeneralUtility::makeInstance(\TYPO3\CMS\Fluid\View\StandaloneView::class);
$this->view->getRequest()->setControllerExtensionName('scheduler');
$this->moduleUri = BackendUtility::getModuleUrl($this->moduleName);
$this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
$pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/Modal');
$pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/SplitButtons');
}
示例6: main
/**
* main method
*
* @return string
*/
public function main()
{
$this->view = $this->objectManager->get('\\TYPO3\\CMS\\Fluid\\View\\StandaloneView');
$this->view->getRequest()->setControllerExtensionName($this->getExtensionName());
$this->view->getRequest()->setPluginName('UpdateScript');
$this->view->getRequest()->setControllerName('UpdateScript');
$this->view->setLayoutRootPaths($this->getTemplateFolders('layout'));
$this->view->setPartialRootPaths($this->getTemplateFolders('partial'));
$this->view->assign('requestUri', GeneralUtility::getIndpEnv('REQUEST_URI'));
$action = GeneralUtility::_GP('action') ? GeneralUtility::_GP('action') : 'Main';
if (is_callable(array($this, $action . 'Action'))) {
$this->view->setTemplatePathAndFilename($this->getTemplatePath('UpdateScript/' . ucfirst($action) . '.html'));
$content = call_user_func_array(array($this, $action . 'Action'), array());
}
return $content;
}
示例7: setExtbaseVariables
/**
* Set some extbase variables if given
*
* @param array $conf Configuration array
* @return void
*/
protected function setExtbaseVariables(array $conf)
{
/** @var $request \TYPO3\CMS\Extbase\Mvc\Request */
$requestPluginName = isset($conf['extbase.']['pluginName.']) ? $this->cObj->stdWrap($conf['extbase.']['pluginName'], $conf['extbase.']['pluginName.']) : $conf['extbase.']['pluginName'];
if ($requestPluginName) {
$this->view->getRequest()->setPluginName($requestPluginName);
}
$requestControllerExtensionName = isset($conf['extbase.']['controllerExtensionName.']) ? $this->cObj->stdWrap($conf['extbase.']['controllerExtensionName'], $conf['extbase.']['controllerExtensionName.']) : $conf['extbase.']['controllerExtensionName'];
if ($requestControllerExtensionName) {
$this->view->getRequest()->setControllerExtensionName($requestControllerExtensionName);
}
$requestControllerName = isset($conf['extbase.']['controllerName.']) ? $this->cObj->stdWrap($conf['extbase.']['controllerName'], $conf['extbase.']['controllerName.']) : $conf['extbase.']['controllerName'];
if ($requestControllerName) {
$this->view->getRequest()->setControllerName($requestControllerName);
}
$requestControllerActionName = isset($conf['extbase.']['controllerActionName.']) ? $this->cObj->stdWrap($conf['extbase.']['controllerActionName'], $conf['extbase.']['controllerActionName.']) : $conf['extbase.']['controllerActionName'];
if ($requestControllerActionName) {
$this->view->getRequest()->setControllerActionName($requestControllerActionName);
}
}
示例8: render
/**
* Add sys_notes as additional content to the footer of the page module
*
* @param array $params
* @param PageLayoutController $parentObject
* @return string
*/
public function render(array $params = array(), PageLayoutController $parentObject)
{
if ($parentObject->MOD_SETTINGS['function'] == 1) {
$pageInfo = $parentObject->pageinfo;
if ($this->pageCanBeIndexed($pageInfo)) {
// template
$this->loadCss();
$this->loadJavascript();
//load partial paths info from typoscript
$this->view = GeneralUtility::makeInstance(StandaloneView::class);
$this->view->setFormat('html');
$this->view->getRequest()->setControllerExtensionName('cs_seo');
$absoluteResourcesPath = ExtensionManagementUtility::extPath('cs_seo') . 'Resources/';
$layoutPaths = [$absoluteResourcesPath . 'Private/Layouts/'];
$partialPaths = [$absoluteResourcesPath . 'Private/Partials/'];
// load partial paths info from TypoScript
if ($this->isTYPO3VersionGreather6) {
/** @var ObjectManager $objectManager */
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
/** @var ConfigurationManagerInterface $configurationManager */
$configurationManager = $objectManager->get(ConfigurationManagerInterface::class);
$tsSetup = $configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, 'csseo');
$layoutPaths = $tsSetup["view"]["layoutRootPaths"] ?: $layoutPaths;
$partialPaths = $tsSetup["view"]["partialRootPaths"] ?: $partialPaths;
}
$this->view->setLayoutRootPaths($layoutPaths);
$this->view->setPartialRootPaths($partialPaths);
$this->view->setTemplatePathAndFilename(ExtensionManagementUtility::extPath('cs_seo') . 'Resources/Private/Templates/PageHook.html');
$results = $this->getResults($pageInfo, $parentObject->current_sys_language);
$score = $results['Percentage'];
unset($results['Percentage']);
$this->view->assignMultiple(['score' => $score, 'results' => $results, 'page' => $parentObject->pageinfo]);
return $this->view->render();
}
}
}
示例9: __construct
/**
* Constructor
*/
public function __construct()
{
$this->view = GeneralUtility::makeInstance(StandaloneView::class);
$this->view->getRequest()->setControllerExtensionName('lowlevel');
}
示例10: __construct
/**
* Constructor
*/
public function __construct()
{
$this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
$this->presetRepository = GeneralUtility::makeInstance(PresetRepository::class);
$templatePath = ExtensionManagementUtility::extPath('impexp') . 'Resources/Private/';
/* @var $view StandaloneView */
$this->standaloneView = GeneralUtility::makeInstance(StandaloneView::class);
$this->standaloneView->setTemplateRootPaths([$templatePath . 'Templates/ImportExport/']);
$this->standaloneView->setLayoutRootPaths([$templatePath . 'Layouts/']);
$this->standaloneView->setPartialRootPaths([$templatePath . 'Partials/']);
$this->standaloneView->getRequest()->setControllerExtensionName('impexp');
}