本文整理汇总了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');
}
示例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');
}
示例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;
}
示例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);
}
示例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));
}
示例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);
}