PHP code example of sbuerk / typo3-site-based-test-trait
1. Go to this page and download the library: Download sbuerk/typo3-site-based-test-trait library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sbuerk / typo3-site-based-test-trait example snippets
/**
* Sets up a root-page containing TypoScript settings for frontend testing.
*
* Parameter `$typoScriptFiles` can either be
* + `[
* 'EXT:extension/path/first.typoscript',
* 'EXT:extension/path/second.typoscript'
* ]`
* which just loads files to the setup setion of the TypoScript template
* record (legacy behavior of this method)
* + `[
* 'constants' => ['EXT:extension/path/constants.typoscript'],
* 'setup' => ['EXT:extension/path/setup.typoscript']
* ]`
* which allows to define contents for the `constants` and `setup` part
* of the TypoScript template record at the same time
*
* @param int $pageId
* @param array{constants?: string[], setup?: string[]}|string[] $typoScriptFiles
* @param array<string, mixed> $templateValues
* @param bool $createSysTemplateRecord TRUE if sys_template record should be created, FALSE does not create one
* but removes an existing one.
*/
protected function setUpFrontendRootPage(
int $pageId,
array $typoScriptFiles = [],
array $templateValues = [],
bool $createSysTemplateRecord = true,
): void;
$this->setUpFrontendRootPage(
1000,
[], // will be ignored/not used due to false as 4th argument
[], // will be ignored/not used due to false as 4th argument
false,
);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.