src/Graviton/GeneratorBundle/Command/GenerateDynamicBundleCommand.php
protected function generateSubResources(
        OutputInterface $output,
        JsonDefinition $jsonDef,
        $bundleName,
        $bundleClassName
    ) {
        foreach ($this->getSubResources($jsonDef) as $subRecource) {
            $arguments = [
                'graviton:generate:resource',
                '--no-debug' => null,
                '--entity' => $bundleName . ':' . $subRecource->getId(),
                '--bundleClassName' => $bundleClassName,
                '--json' => $this->serializer->serialize($subRecource->getDef(), 'json'),
                '--no-controller' => 'true',
            ];
            $this->generateResource($arguments, $output, $jsonDef);
        }
    }
protected function generateSubResources(
        OutputInterface $output,
        JsonDefinition $jsonDef,
        $bundleName,
        $bundleClassName
    ) {
        foreach ($this->getSubResources($jsonDef) as $subRecource) {
            $arguments = [
                'graviton:generate:resource',
                '--no-debug' => null,
                '--entity' => $bundleName . ':' . $subRecource->getId(),
                '--bundleClassName' => $bundleClassName,
                '--json' => $this->serializer->serialize($subRecource->getDef(), 'json'),
                '--no-controller' => 'true',
            ];
            $this->generateResource($arguments, $output, $jsonDef);
        }
    }
protected function generateSubResources ( OutputInterface $ output , JsonDefinition $ jsonDef , $ bundleName , $ bundleClassName ) { foreach ( $ this -> getSubResources ( $ jsonDef ) as $ subRecource ) { $ arguments = [ 'graviton:generate:resource' , '--no-debug' => null , '--entity' => $ bundleName . ':' . $ subRecource -> getId ( ) , '--bundleClassName' => $ bundleClassName , '--json' => $ this -> serializer -> serialize ( $ subRecource -> getDef ( ) , 'json' ) , '--no-controller' => 'true' , ] ; $ this -> generateResource ( $ arguments , $ output , $ jsonDef ) ; } }
Generate Bundle entities

@param OutputInterface $output          Instance to sent text to be displayed on stout.
@param JsonDefinition  $jsonDef         Configuration to be generated the entity from.
@param string          $bundleName      Name of the bundle the entity shall be generated for.
@param string          $bundleClassName class name

@return void
@throws \Exception
Generate Bundle entities