Flexform 

\nn\t3::Flexform() 

FlexForms laden und parsen

Overview of Methods 

\nn\t3::Flexform()->getFalMedia($ttContentUid = NULL, $field = ''); 

Lädt FAL-Media, die in direkt im FlexForm angegeben wurden

\nn\t3::Flexform()->getFalMedia( 'falmedia' );
\nn\t3::Flexform()->getFalMedia( 'settings.falmedia' );
\nn\t3::Flexform()->getFalMedia( 1201, 'falmedia' );
Copied!
$cObjData = \nn\t3::Tsfe()->cObjData();
$falMedia = \nn\t3::Flexform()->getFalMedia( $cObjData['uid'], 'falmedia' );
Copied!

| @return array

| ➜ Go to source code of Flexform::getFalMedia()

\nn\t3::Flexform()->getFlexform($ttContentUid = NULL); 

Holt das Flexform eines bestimmten Inhaltselementes als Array

\nn\t3::Flexform()->getFlexform( 1201 );
Copied!

| @return array

| ➜ Go to source code of Flexform::getFlexform()

\nn\t3::Flexform()->insertCountries($config, $a = NULL); 

Fügt Optionen aus TypoScript zur Auswahl in ein FlexForm oder TCA ein.

<config>
    <type>select</type>
    <items type="array"></items>
    <itemsProcFunc>nn\t3\Flexform->insertCountries</itemsProcFunc>
    <insertEmpty>1</insertEmpty>
</config>
Copied!

| @return array

| ➜ Go to source code of Flexform::insertCountries()

\nn\t3::Flexform()->insertOptions($config, $a = NULL); 

Fügt Optionen aus TypoScript zur Auswahl in ein FlexForm oder TCA ein.

<config>
    <type>select</type>
    <items type="array"></items>
    <itemsProcFunc>nn\t3\Flexform->insertOptions</itemsProcFunc>
    <typoscriptPath>plugin.tx_extname.settings.templates</typoscriptPath>
    <!-- Alternativ: Settings aus PageTSConfig laden: -->
    <pageconfigPath>tx_extname.colors</pageconfigPath>
    <!-- Optional: Eigenen Key aus TypoScript verwenden -->
    <customKey>value</customKey>
    <insertEmpty>1</insertEmpty>
    <insertEmptyLabel>Nichts</insertEmptyLabel>
    <insertEmptyValue></insertEmptyValue>
    <hideKey>1</hideKey>
</config>
Copied!

Beim Typoscript sind verschiedene Arten des Aufbaus erlaubt:

plugin.tx_extname.settings.templates {
    # Direkte key => label Paare
    small = Small Design
    # ... oder: Label im Subarray gesetzt
    mid {
        label = Mid Design
    }
    # ... oder: Key im Subarray gesetzt, praktisch z.B. für CSS-Klassen
    10 {
        label = Big Design
        classes = big big-thing
    }
    # ... oder eine userFunc. Gibt eine der Varianten oben als Array zurück
    30 {
        userFunc = nn\t3\Flexform->getOptions
    }
}
Copied!

Die Auswahl kann im TypoScript auf bestimmte Controller-Actions beschränkt werden. In diesem Beispiel wird die Option "Gelb" nur angezeigt, wenn in der switchableControllerAction | Category->list gewählt wurde.

plugin.tx_extname.settings.templates {
    yellow {
        label = Gelb
        controllerAction = Category->list,...
    }
}
Copied!

| @return array

| ➜ Go to source code of Flexform::insertOptions()

\nn\t3::Flexform()->parse($xml = ''); 

Wandelt ein Flexform-XML in ein Array um

\nn\t3::Flexform()->parse('<?xml...>');
Copied!

Existiert auch als ViewHelper:

{rawXmlString->nnt3:parse.flexForm()->f:debug()}
Copied!

| @return array

| ➜ Go to source code of Flexform::parse()

Methods