src/Kunstmaan/GeneratorBundle/Generator/DefaultPagePartGenerator.php
public function generate(BundleInterface $bundle, $entity, $prefix, array $sections, $behatTest)
    {
        $this->bundle = $bundle;
        $this->entity = $entity;
        $this->prefix = $prefix;
        $this->sections = $sections;

        $this->generatePagePartEntity();
        if ($entity != 'AbstractPagePart') {
            $this->generateFormType();
            $this->generateResourceTemplate();
            $this->generateSectionConfig();
            if ($behatTest) {
                $this->generateBehatTest();
            }
        }
    }
public function generate(BundleInterface $bundle, $entity, $prefix, array $sections, $behatTest)
    {
        $this->bundle = $bundle;
        $this->entity = $entity;
        $this->prefix = $prefix;
        $this->sections = $sections;

        $this->generatePagePartEntity();
        if ($entity != 'AbstractPagePart') {
            $this->generateFormType();
            $this->generateResourceTemplate();
            $this->generateSectionConfig();
            if ($behatTest) {
                $this->generateBehatTest();
            }
        }
    }
public function generate ( BundleInterface $ bundle , $ entity , $ prefix , array $ sections , $ behatTest ) { $ this -> bundle = $ bundle ; $ this -> entity = $ entity ; $ this -> prefix = $ prefix ; $ this -> sections = $ sections ; $ this -> generatePagePartEntity ( ) ; if ( $ entity != 'AbstractPagePart' ) { $ this -> generateFormType ( ) ; $ this -> generateResourceTemplate ( ) ; $ this -> generateSectionConfig ( ) ; if ( $ behatTest ) { $ this -> generateBehatTest ( ) ; } } }
Generate the pagepart.

@param BundleInterface $bundle    The bundle
@param string          $entity    The entity name
@param string          $prefix    The database prefix
@param array           $sections  The page sections
@param bool            $behatTest If we need to generate a behat test for this pagepart

@throws \RuntimeException
Generate the pagepart .