public function generateSetupTyposcript($configuration, $settings)
    {
        // generate TypoScript setup
        $setupContent = [];

        // for backend module
        $setupContent[] = $this->convertArrayToTypoScript([
            'view' => [
                'templateRootPaths' => [
                    10 => 'EXT:mask/Resources/Private/Backend/Templates/'
                ],
                'partialRootPaths' => [
                    10 => 'EXT:mask/Resources/Private/Backend/Partials/'
                ],
                'layoutRootPaths' => [
                    10 => 'EXT:mask/Resources/Private/Backend/Layouts/'
                ]
            ],
            'persistence' => [
                'classes' => [
                    BackendLayout::class => [
                        'mapping' => [
                            'tableName' => 'backend_layout',
                            'columns' => [
                                'uid.mapOnProperty' => 'uid',
                                'title.mapOnProperty' => 'title'
                            ]
                        ]
                    ]
                ]
            ]
        ], 'module.tx_mask');

        // for base paths to fluid templates configured in extension settings
        $setupContent[] = $this->convertArrayToTypoScript([
            'templateRootPaths' => [
                10 => rtrim($settings['content'], '/') . '/'
            ],
            'partialRootPaths' => [
                10 => rtrim($settings['partials'], '/') . '/'
            ],
            'layoutRootPaths' => [
                10 => rtrim($settings['layouts'], '/') . '/'
            ]
        ], 'lib.maskContentElement');

        // for each content element
        if ($configuration["tt_content"]["elements"]) {
            foreach ($configuration["tt_content"]["elements"] as $element) {
                if (!$element["hidden"]) {
                    $setupContent[] = "tt_content.mask_" . $element["key"] .
                        " =< lib.maskContentElement\ntt_content.mask_" . $element["key"] .
                        " {\ntemplateName = " . MaskUtility::getTemplatePath(
                            $settings,
                            $element['key'],
                            true
                        ) . "\n}\n\n";
                }
            }
        }

        return implode("\n\n", $setupContent);
    }
public function generateSetupTyposcript($configuration, $settings)
    {
        // generate TypoScript setup
        $setupContent = [];

        // for backend module
        $setupContent[] = $this->convertArrayToTypoScript([
            'view' => [
                'templateRootPaths' => [
                    10 => 'EXT:mask/Resources/Private/Backend/Templates/'
                ],
                'partialRootPaths' => [
                    10 => 'EXT:mask/Resources/Private/Backend/Partials/'
                ],
                'layoutRootPaths' => [
                    10 => 'EXT:mask/Resources/Private/Backend/Layouts/'
                ]
            ],
            'persistence' => [
                'classes' => [
                    BackendLayout::class => [
                        'mapping' => [
                            'tableName' => 'backend_layout',
                            'columns' => [
                                'uid.mapOnProperty' => 'uid',
                                'title.mapOnProperty' => 'title'
                            ]
                        ]
                    ]
                ]
            ]
        ], 'module.tx_mask');

        // for base paths to fluid templates configured in extension settings
        $setupContent[] = $this->convertArrayToTypoScript([
            'templateRootPaths' => [
                10 => rtrim($settings['content'], '/') . '/'
            ],
            'partialRootPaths' => [
                10 => rtrim($settings['partials'], '/') . '/'
            ],
            'layoutRootPaths' => [
                10 => rtrim($settings['layouts'], '/') . '/'
            ]
        ], 'lib.maskContentElement');

        // for each content element
        if ($configuration["tt_content"]["elements"]) {
            foreach ($configuration["tt_content"]["elements"] as $element) {
                if (!$element["hidden"]) {
                    $setupContent[] = "tt_content.mask_" . $element["key"] .
                        " =< lib.maskContentElement\ntt_content.mask_" . $element["key"] .
                        " {\ntemplateName = " . MaskUtility::getTemplatePath(
                            $settings,
                            $element['key'],
                            true
                        ) . "\n}\n\n";
                }
            }
        }

        return implode("\n\n", $setupContent);
    }
public function generateSetupTyposcript ( $ configuration , $ settings ) { // generate TypoScript setup $ setupContent = [ ] ; // for backend module $ setupContent [ ] = $ this -> convertArrayToTypoScript ( [ 'view' => [ 'templateRootPaths' => [ 10 => 'EXT:mask/Resources/Private/Backend/Templates/' ] , 'partialRootPaths' => [ 10 => 'EXT:mask/Resources/Private/Backend/Partials/' ] , 'layoutRootPaths' => [ 10 => 'EXT:mask/Resources/Private/Backend/Layouts/' ] ] , 'persistence' => [ 'classes' => [ BackendLayout :: class => [ 'mapping' => [ 'tableName' => 'backend_layout' , 'columns' => [ 'uid.mapOnProperty' => 'uid' , 'title.mapOnProperty' => 'title' ] ] ] ] ] ] , 'module.tx_mask' ) ; // for base paths to fluid templates configured in extension settings $ setupContent [ ] = $ this -> convertArrayToTypoScript ( [ 'templateRootPaths' => [ 10 => rtrim ( $ settings [ 'content' ] , '/' ) . '/' ] , 'partialRootPaths' => [ 10 => rtrim ( $ settings [ 'partials' ] , '/' ) . '/' ] , 'layoutRootPaths' => [ 10 => rtrim ( $ settings [ 'layouts' ] , '/' ) . '/' ] ] , 'lib.maskContentElement' ) ; // for each content element if ( $ configuration [ "tt_content" ] [ "elements" ] ) { foreach ( $ configuration [ "tt_content" ] [ "elements" ] as $ element ) { if ( ! $ element [ "hidden" ] ) { $ setupContent [ ] = "tt_content.mask_" . $ element [ "key" ] . " =< lib.maskContentElement\ntt_content.mask_" . $ element [ "key" ] . " {\ntemplateName = " . MaskUtility :: getTemplatePath ( $ settings , $ element [ 'key' ] , true ) . "\n}\n\n" ; } } } return implode ( "\n\n" , $ setupContent ) ; }
Generates the typoscript for the setup field
@param array $configuration
@param array $settings
@return string
Generates the typoscript for the setup field