当前位置: 首页>>代码示例>>PHP>>正文


PHP StandaloneView::setFormat方法代码示例

本文整理汇总了PHP中TYPO3\CMS\Fluid\View\StandaloneView::setFormat方法的典型用法代码示例。如果您正苦于以下问题:PHP StandaloneView::setFormat方法的具体用法?PHP StandaloneView::setFormat怎么用?PHP StandaloneView::setFormat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TYPO3\CMS\Fluid\View\StandaloneView的用法示例。


在下文中一共展示了StandaloneView::setFormat方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setFormat

 /**
  * Set different format if given in configuration
  *
  * @param array $conf Configuration array
  * @return void
  */
 protected function setFormat(array $conf)
 {
     $format = isset($conf['format.']) ? $this->cObj->stdWrap($conf['format'], $conf['format.']) : $conf['format'];
     if ($format) {
         $this->view->setFormat($format);
     }
 }
开发者ID:rob-ot-dot-be,项目名称:ggallkeysecurity,代码行数:13,代码来源:FluidTemplateContentObject.php

示例2: 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();
         }
     }
 }
开发者ID:clickstorm,项目名称:cs_seo,代码行数:43,代码来源:PageHook.php

示例3: setFormatSetsRequestFormat

 /**
  * @test
  */
 public function setFormatSetsRequestFormat()
 {
     $this->mockRequest->expects($this->once())->method('setFormat')->with('xml');
     $this->view->setFormat('xml');
 }
开发者ID:Mr-Robota,项目名称:TYPO3.CMS,代码行数:8,代码来源:StandaloneViewTest.php


注:本文中的TYPO3\CMS\Fluid\View\StandaloneView::setFormat方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。