Guides

guides.xml

Add a configuration option (Extension)

Extension authors can add additional configuration options in the extension tag (allowed to occur multiple times):

guides.xml
<extension class="\T3Docs\Typo3DocsTheme\DependencyInjection\Typo3DocsThemeExtension"
           project-home="https://docs.typo3.org/"
           project-contact="https://typo3.slack.com/archives/C028JEPJL"/>

These must then be interpreted by the extension itself. The interpretation is usually done in a PostProjectNodeCreated event.

Add a configuration option (Contributors, directly in the guides)

In order to add a configuration option to the guides.xml the option must be added to the XML schema, guides.xsd . You can find it at packages/guides-cli/resources/schema/guides.xsd in the mono repository.

Register the new configuration option in the TreeBuilder at GuidesExtension::getConfigTreeBuilder() .

Using the tree builder is a topic of itself. Refer to the according symfony documentation.

If the configuration is a setting option to controll the applications workflow you can save it in the ProjectSettings . Examples of settings options would be logPath , showProgressBar or theme .

If the configuration contains data that should be output in the templates, it is advised to save the value in the ProjectNode . Examples would be copyright , release or keywords (for the metadata area).

Save a configuration value into the ProjectSettings

To add a configuration value to the ProjectSettings , register the setting in GuidesExtension::load() .

phpDocumentorGuidesDependencyInjectionGuidesExtension::load
if (isset($config['ignored_domain']) && is_array($config['ignored_domain'])) {
    $projectSettings->setIgnoredDomains($config['ignored_domain']);
}

Save a configuration value to the ProjectNode

Additional settings can be added to the ProjectNode in a PostProjectNodeCreated event.

Search results