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


PHP ContentObjectRenderer::setContentObjectClassMap方法代码示例

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


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

示例1: setUp

	/**
	 * Set up
	 */
	protected function setUp() {
		$this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
		$this->createMockedLoggerAndLogManager();

		$this->templateServiceMock = $this->getMock(\TYPO3\CMS\Core\TypoScript\TemplateService::class, array('getFileName', 'linkData'));
		$pageRepositoryMock = $this->getMock(\TYPO3\CMS\Frontend\Page\PageRepository::class, array('getRawRecord'));

		$this->typoScriptFrontendControllerMock = $this->getAccessibleMock(\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::class, array('dummy'), array(), '', FALSE);
		$this->typoScriptFrontendControllerMock->tmpl = $this->templateServiceMock;
		$this->typoScriptFrontendControllerMock->config = array();
		$this->typoScriptFrontendControllerMock->page = array();
		$this->typoScriptFrontendControllerMock->sys_page = $pageRepositoryMock;
		$this->typoScriptFrontendControllerMock->csConvObj = new CharsetConverter();
		$this->typoScriptFrontendControllerMock->renderCharset = 'utf-8';
		$GLOBALS['TSFE'] = $this->typoScriptFrontendControllerMock;

		$GLOBALS['TYPO3_DB'] = $this->getMock(\TYPO3\CMS\Core\Database\DatabaseConnection::class, array());
		$GLOBALS['TYPO3_CONF_VARS']['SYS']['t3lib_cs_utils'] = 'mbstring';

		$this->subject = $this->getAccessibleMock(
			\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class,
			array('getResourceFactory', 'getEnvironmentVariable'),
			array($this->typoScriptFrontendControllerMock)
		);
		$this->subject->setContentObjectClassMap($this->contentObjectMap);
		$this->subject->start(array(), 'tt_content');
	}
开发者ID:,项目名称:,代码行数:30,代码来源:

示例2: setUp

 /**
  * Set up
  */
 protected function setUp()
 {
     $this->currentLocale = setlocale(LC_NUMERIC, 0);
     $this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
     $this->createMockedLoggerAndLogManager();
     $this->templateServiceMock = $this->getMock(TemplateService::class, array('getFileName', 'linkData'));
     $pageRepositoryMock = $this->getMock(PageRepositoryFixture::class, array('getRawRecord', 'getMountPointInfo'));
     $this->typoScriptFrontendControllerMock = $this->getAccessibleMock(TypoScriptFrontendController::class, array('dummy'), array(), '', false);
     $this->typoScriptFrontendControllerMock->tmpl = $this->templateServiceMock;
     $this->typoScriptFrontendControllerMock->config = array();
     $this->typoScriptFrontendControllerMock->page = array();
     $this->typoScriptFrontendControllerMock->sys_page = $pageRepositoryMock;
     $GLOBALS['TSFE'] = $this->typoScriptFrontendControllerMock;
     $GLOBALS['TYPO3_DB'] = $this->getMock(\TYPO3\CMS\Core\Database\DatabaseConnection::class, array());
     $this->subject = $this->getAccessibleMock(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class, array('getResourceFactory', 'getEnvironmentVariable'), array($this->typoScriptFrontendControllerMock));
     $this->subject->setContentObjectClassMap($this->contentObjectMap);
     $this->subject->start(array(), 'tt_content');
 }
开发者ID:dachcom-digital,项目名称:TYPO3.CMS,代码行数:21,代码来源:ContentObjectRendererTest.php

示例3: setUp

 /**
  * Sets up this testcase
  */
 protected function setUp()
 {
     parent::setUp();
     // Allow objects until 100 levels deep when executing the stdWrap
     $GLOBALS['TSFE'] = new \stdClass();
     $GLOBALS['TSFE']->cObjectDepthCounter = 100;
     $this->abstractPlugin = new \TYPO3\CMS\Frontend\Plugin\AbstractPlugin();
     $contentObjectRenderer = new ContentObjectRenderer();
     $contentObjectRenderer->setContentObjectClassMap(array('TEXT' => TextContentObject::class));
     $this->abstractPlugin->cObj = $contentObjectRenderer;
     $this->defaultPiVars = $this->abstractPlugin->piVars;
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:15,代码来源:AbstractPluginTest.php

示例4: setUp

 /**
  * Set up
  */
 protected function setUp()
 {
     /** @var TypoScriptFrontendController $tsfe */
     $tsfe = $this->getMock(TypoScriptFrontendController::class, array('dummy'), array(), '', false);
     $tsfe->tmpl = $this->getMock(TemplateService::class, array('dummy'));
     $tsfe->config = array();
     $tsfe->page = array();
     $tsfe->sys_page = $this->getMock(PageRepository::class, array('getRawRecord'));
     $GLOBALS['TSFE'] = $tsfe;
     $contentObjectRenderer = new ContentObjectRenderer();
     $contentObjectRenderer->setContentObjectClassMap(array('CASE' => CaseContentObject::class, 'TEXT' => TextContentObject::class));
     $this->subject = new CaseContentObject($contentObjectRenderer);
 }
开发者ID:dachcom-digital,项目名称:TYPO3.CMS,代码行数:16,代码来源:CaseContentObjectTest.php

示例5: setUp

 /**
  * Set up
  */
 protected function setUp()
 {
     $templateService = $this->getMock(TemplateService::class, array('getFileName', 'linkData'));
     $this->tsfe = $this->getMock(TypoScriptFrontendController::class, array('dummy'), array(), '', false);
     $this->tsfe->tmpl = $templateService;
     $this->tsfe->config = array();
     $this->tsfe->page = array();
     $sysPageMock = $this->getMock(PageRepository::class, array('getRawRecord'));
     $this->tsfe->sys_page = $sysPageMock;
     $GLOBALS['TSFE'] = $this->tsfe;
     $contentObjectRenderer = new ContentObjectRenderer();
     $contentObjectRenderer->setContentObjectClassMap(array('FILES' => FilesContentObject::class, 'TEXT' => TextContentObject::class));
     $this->subject = $this->getMock(FilesContentObject::class, array('getFileCollector'), array($contentObjectRenderer));
 }
开发者ID:dachcom-digital,项目名称:TYPO3.CMS,代码行数:17,代码来源:FilesContentObjectTest.php

示例6: setUp

 /**
  * Set up
  */
 protected function setUp()
 {
     $templateService = $this->getMock(\TYPO3\CMS\Core\TypoScript\TemplateService::class, array('getFileName', 'linkData'));
     $this->tsfe = $this->getMock(\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::class, array('dummy'), array(), '', FALSE);
     $this->tsfe->tmpl = $templateService;
     $this->tsfe->config = array();
     $this->tsfe->page = array();
     $sysPageMock = $this->getMock(\TYPO3\CMS\Frontend\Page\PageRepository::class, array('getRawRecord'));
     $this->tsfe->sys_page = $sysPageMock;
     $GLOBALS['TSFE'] = $this->tsfe;
     $GLOBALS['TSFE']->csConvObj = new \TYPO3\CMS\Core\Charset\CharsetConverter();
     $GLOBALS['TSFE']->renderCharset = 'utf-8';
     $contentObjectRenderer = new ContentObjectRenderer();
     $contentObjectRenderer->setContentObjectClassMap(array('FILES' => FilesContentObject::class, 'TEXT' => TextContentObject::class));
     $this->subject = new FilesContentObject($contentObjectRenderer);
 }
开发者ID:adrolli,项目名称:TYPO3.CMS,代码行数:19,代码来源:FilesContentObjectTest.php


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