src/Kunstmaan/GeneratorBundle/Generator/DefaultSiteGenerator.php
public function generatePagepartConfigs(array $parameters)
    {
        $basePath = $this->isSymfony4() ? $this->container->getParameter('kernel.project_dir') : $this->bundle->getPath();
        $relPath = $this->isSymfony4() ? '/config/kunstmaancms/pageparts' : '/Resources/config/pageparts/';
        $sourceDir = $this->skeletonDir.'/Resources/config/pageparts/';
        $targetDir = $basePath.$relPath;

        $this->renderSingleFile($sourceDir, $targetDir, 'main.yml', $parameters);

        if ($this->demosite) {
            $this->renderSingleFile($sourceDir, $targetDir, 'header.yml', $parameters);
            $this->renderSingleFile($sourceDir, $targetDir, 'section1.yml', $parameters);
            $this->renderSingleFile($sourceDir, $targetDir, 'section2.yml', $parameters);
            $this->renderSingleFile($sourceDir, $targetDir, 'section3.yml', $parameters);
            $this->renderSingleFile($sourceDir, $targetDir, 'section4.yml', $parameters);
            $this->renderSingleFile($sourceDir, $targetDir, 'section5.yml', $parameters);
            $this->renderSingleFile($sourceDir, $targetDir, 'form.yml', $parameters);
        }

        $this->assistant->writeLine('Generating pagepart configuration : <info>OK</info>');
    }
public function generatePagepartConfigs(array $parameters)
    {
        $basePath = $this->isSymfony4() ? $this->container->getParameter('kernel.project_dir') : $this->bundle->getPath();
        $relPath = $this->isSymfony4() ? '/config/kunstmaancms/pageparts' : '/Resources/config/pageparts/';
        $sourceDir = $this->skeletonDir.'/Resources/config/pageparts/';
        $targetDir = $basePath.$relPath;

        $this->renderSingleFile($sourceDir, $targetDir, 'main.yml', $parameters);

        if ($this->demosite) {
            $this->renderSingleFile($sourceDir, $targetDir, 'header.yml', $parameters);
            $this->renderSingleFile($sourceDir, $targetDir, 'section1.yml', $parameters);
            $this->renderSingleFile($sourceDir, $targetDir, 'section2.yml', $parameters);
            $this->renderSingleFile($sourceDir, $targetDir, 'section3.yml', $parameters);
            $this->renderSingleFile($sourceDir, $targetDir, 'section4.yml', $parameters);
            $this->renderSingleFile($sourceDir, $targetDir, 'section5.yml', $parameters);
            $this->renderSingleFile($sourceDir, $targetDir, 'form.yml', $parameters);
        }

        $this->assistant->writeLine('Generating pagepart configuration : <info>OK</info>');
    }
public function generatePagepartConfigs ( array $ parameters ) { $ basePath = $ this -> isSymfony4 ( ) ? $ this -> container -> getParameter ( 'kernel.project_dir' ) : $ this -> bundle -> getPath ( ) ; $ relPath = $ this -> isSymfony4 ( ) ? '/config/kunstmaancms/pageparts' : '/Resources/config/pageparts/' ; $ sourceDir = $ this -> skeletonDir . '/Resources/config/pageparts/' ; $ targetDir = $ basePath . $ relPath ; $ this -> renderSingleFile ( $ sourceDir , $ targetDir , 'main.yml' , $ parameters ) ; if ( $ this -> demosite ) { $ this -> renderSingleFile ( $ sourceDir , $ targetDir , 'header.yml' , $ parameters ) ; $ this -> renderSingleFile ( $ sourceDir , $ targetDir , 'section1.yml' , $ parameters ) ; $ this -> renderSingleFile ( $ sourceDir , $ targetDir , 'section2.yml' , $ parameters ) ; $ this -> renderSingleFile ( $ sourceDir , $ targetDir , 'section3.yml' , $ parameters ) ; $ this -> renderSingleFile ( $ sourceDir , $ targetDir , 'section4.yml' , $ parameters ) ; $ this -> renderSingleFile ( $ sourceDir , $ targetDir , 'section5.yml' , $ parameters ) ; $ this -> renderSingleFile ( $ sourceDir , $ targetDir , 'form.yml' , $ parameters ) ; } $ this -> assistant -> writeLine ( 'Generating pagepart configuration : <info>OK</info>' ) ; }
Generate the pagepart section configuration.

@param array $parameters The template parameters
Generate the pagepart section configuration .