src/Kunstmaan/GeneratorBundle/Generator/DefaultSiteGenerator.php
public function generateEntities(array $parameters)
    {
        $relPath = '/Entity/Pages/';
        $sourceDir = $this->skeletonDir.$relPath;
        $targetDir = $this->bundle->getPath().$relPath;

        $this->renderSingleFile($sourceDir, $targetDir, 'HomePage.php', $parameters);
        $this->renderSingleFile($sourceDir, $targetDir, 'ContentPage.php', $parameters);
        $this->renderSingleFile($sourceDir, $targetDir, 'BehatTestPage.php', $parameters);

        if ($this->demosite) {
            $this->renderSingleFile($sourceDir, $targetDir, 'FormPage.php', $parameters);
            $this->renderSingleFile($sourceDir, $targetDir, 'SearchPage.php', $parameters);
        }

        if ($this->demosite) {
            $relPath = '/Entity/PageParts/';
            $sourceDir = $this->skeletonDir.$relPath;
            $targetDir = $this->bundle->getPath().$relPath;

            $this->renderSingleFile($sourceDir, $targetDir, 'PageBannerPagePart.php', $parameters);
            $this->renderSingleFile($sourceDir, $targetDir, 'ServicePagePart.php', $parameters);
            $this->renderSingleFile($sourceDir, $targetDir, 'UspPagePart.php', $parameters);
            $this->renderSingleFile($sourceDir, $targetDir, 'BikesListPagePart.php', $parameters);
        }

        if ($this->demosite) {
            $relPath = '/Entity/';
            $sourceDir = $this->skeletonDir.$relPath;
            $targetDir = $this->bundle->getPath().$relPath;

            $this->renderSingleFile($sourceDir, $targetDir, 'Bike.php', $parameters);
            $this->renderSingleFile($sourceDir, $targetDir, 'UspItem.php', $parameters);
        }

        $this->assistant->writeLine('Generating entities : <info>OK</info>');
    }
public function generateEntities(array $parameters)
    {
        $relPath = '/Entity/Pages/';
        $sourceDir = $this->skeletonDir.$relPath;
        $targetDir = $this->bundle->getPath().$relPath;

        $this->renderSingleFile($sourceDir, $targetDir, 'HomePage.php', $parameters);
        $this->renderSingleFile($sourceDir, $targetDir, 'ContentPage.php', $parameters);
        $this->renderSingleFile($sourceDir, $targetDir, 'BehatTestPage.php', $parameters);

        if ($this->demosite) {
            $this->renderSingleFile($sourceDir, $targetDir, 'FormPage.php', $parameters);
            $this->renderSingleFile($sourceDir, $targetDir, 'SearchPage.php', $parameters);
        }

        if ($this->demosite) {
            $relPath = '/Entity/PageParts/';
            $sourceDir = $this->skeletonDir.$relPath;
            $targetDir = $this->bundle->getPath().$relPath;

            $this->renderSingleFile($sourceDir, $targetDir, 'PageBannerPagePart.php', $parameters);
            $this->renderSingleFile($sourceDir, $targetDir, 'ServicePagePart.php', $parameters);
            $this->renderSingleFile($sourceDir, $targetDir, 'UspPagePart.php', $parameters);
            $this->renderSingleFile($sourceDir, $targetDir, 'BikesListPagePart.php', $parameters);
        }

        if ($this->demosite) {
            $relPath = '/Entity/';
            $sourceDir = $this->skeletonDir.$relPath;
            $targetDir = $this->bundle->getPath().$relPath;

            $this->renderSingleFile($sourceDir, $targetDir, 'Bike.php', $parameters);
            $this->renderSingleFile($sourceDir, $targetDir, 'UspItem.php', $parameters);
        }

        $this->assistant->writeLine('Generating entities : <info>OK</info>');
    }
public function generateEntities ( array $ parameters ) { $ relPath = '/Entity/Pages/' ; $ sourceDir = $ this -> skeletonDir . $ relPath ; $ targetDir = $ this -> bundle -> getPath ( ) . $ relPath ; $ this -> renderSingleFile ( $ sourceDir , $ targetDir , 'HomePage.php' , $ parameters ) ; $ this -> renderSingleFile ( $ sourceDir , $ targetDir , 'ContentPage.php' , $ parameters ) ; $ this -> renderSingleFile ( $ sourceDir , $ targetDir , 'BehatTestPage.php' , $ parameters ) ; if ( $ this -> demosite ) { $ this -> renderSingleFile ( $ sourceDir , $ targetDir , 'FormPage.php' , $ parameters ) ; $ this -> renderSingleFile ( $ sourceDir , $ targetDir , 'SearchPage.php' , $ parameters ) ; } if ( $ this -> demosite ) { $ relPath = '/Entity/PageParts/' ; $ sourceDir = $ this -> skeletonDir . $ relPath ; $ targetDir = $ this -> bundle -> getPath ( ) . $ relPath ; $ this -> renderSingleFile ( $ sourceDir , $ targetDir , 'PageBannerPagePart.php' , $ parameters ) ; $ this -> renderSingleFile ( $ sourceDir , $ targetDir , 'ServicePagePart.php' , $ parameters ) ; $ this -> renderSingleFile ( $ sourceDir , $ targetDir , 'UspPagePart.php' , $ parameters ) ; $ this -> renderSingleFile ( $ sourceDir , $ targetDir , 'BikesListPagePart.php' , $ parameters ) ; } if ( $ this -> demosite ) { $ relPath = '/Entity/' ; $ sourceDir = $ this -> skeletonDir . $ relPath ; $ targetDir = $ this -> bundle -> getPath ( ) . $ relPath ; $ this -> renderSingleFile ( $ sourceDir , $ targetDir , 'Bike.php' , $ parameters ) ; $ this -> renderSingleFile ( $ sourceDir , $ targetDir , 'UspItem.php' , $ parameters ) ; } $ this -> assistant -> writeLine ( 'Generating entities : <info>OK</info>' ) ; }
Generate the entity classes.

@param array $parameters The template parameters
Generate the entity classes .