Generator extends AbstractGenerator

FinalYes

Manage a page tree with all test / demo styleguide data

Internal
Attributes
#[Autoconfigure]
$public: true

Table of Contents

Properties

$tableHandler  : array<string|int, mixed>
List of handlers to create full table data. There is a "default" handler for casual tables, but some $mainTables like several inline scenarios need more sophisticated handlers.

Methods

__construct()  : mixed
create()  : void
Create a page tree for styleguide records and add records on them.
delete()  : void
Delete all pages and their records that belong to the tx_styleguide demo pages
injectConnectionPool()  : void
injectRecordFinder()  : void
addToFal()  : void
Add files to fileadmin/
createSiteConfiguration()  : void
Create a site configuration on new styleguide root page
deleteFalFolder()  : void
Delete files from fileadmin/
executeDataHandler()  : void
getListOfStyleguideMainTables()  : array<string|int, mixed>
List of styleguide "main" pages.
getUidOfLastTopLevelPage()  : int
Returns the uid of the last "top level" page (has pid 0) in the page tree. This is either a positive integer or 0 if no page exists in the page tree at all.
populateRowsOfThirdPartyTables()  : void
Add rows for third party tables like be_users or FAL

Properties

$tableHandler

List of handlers to create full table data. There is a "default" handler for casual tables, but some $mainTables like several inline scenarios need more sophisticated handlers.

protected array<string|int, mixed> $tableHandler = [\TYPO3\CMS\Styleguide\TcaDataGenerator\TableHandler\StaticData::class, \TYPO3\CMS\Styleguide\TcaDataGenerator\TableHandler\InlineMn::class, \TYPO3\CMS\Styleguide\TcaDataGenerator\TableHandler\InlineMnGroup::class, \TYPO3\CMS\Styleguide\TcaDataGenerator\TableHandler\InlineMnSymmetric::class, \TYPO3\CMS\Styleguide\TcaDataGenerator\TableHandler\InlineMnSymmetricGroup::class, \TYPO3\CMS\Styleguide\TcaDataGenerator\TableHandler\General::class]

Methods

delete()

Delete all pages and their records that belong to the tx_styleguide demo pages

public delete() : void

addToFal()

Add files to fileadmin/

protected addToFal(array<string|int, mixed> $files, string $from, string $to) : void
Parameters
$files : array<string|int, mixed>
$from : string
$to : string

createSiteConfiguration()

Create a site configuration on new styleguide root page

protected createSiteConfiguration(int $topPageUid[, string $base = 'http://localhost/' ][, string $title = 'styleguide demo' ][, array<string|int, mixed> $sets = [] ]) : void
Parameters
$topPageUid : int
$base : string = 'http://localhost/'
$title : string = 'styleguide demo'
$sets : array<string|int, mixed> = []

deleteFalFolder()

Delete files from fileadmin/

protected deleteFalFolder(string $path) : void
Parameters
$path : string

executeDataHandler()

protected executeDataHandler([array<string|int, mixed> $data = [] ][, array<string|int, mixed> $commands = [] ]) : void
Parameters
$data : array<string|int, mixed> = []
$commands : array<string|int, mixed> = []

getListOfStyleguideMainTables()

List of styleguide "main" pages.

protected getListOfStyleguideMainTables() : array<string|int, mixed>

A styleguide table is either a "main" entry table or a "child" table that belongs to a main table. Each "main" table is located at an own page with all its children.

The difference is a naming thing, styleguide tables have a "prefix""identifier""childidentifier" structure.

Example: prefix = tx_styleguide_inline, identifier = 1n -> "tx_styleguide_inline_1n" is a "main" table -> "tx_styleguide_inline_1n1n" is a "child" table

In general the list of prefixes is hard coded. If a specific table name is a concatenation of a prefix plus a single word, then the table is considered a "main" table, if there are more than one words after prefix, it is a "child" table.

This method return the list of "main" tables.

Return values
array<string|int, mixed>

getUidOfLastTopLevelPage()

Returns the uid of the last "top level" page (has pid 0) in the page tree. This is either a positive integer or 0 if no page exists in the page tree at all.

protected getUidOfLastTopLevelPage() : int
Return values
int

populateRowsOfThirdPartyTables()

Add rows for third party tables like be_users or FAL

protected populateRowsOfThirdPartyTables() : void

        
On this page

Search results