private function buildBundleDefinition($classname, $bundleId, $baseDir)
    {
        if (false === is_subclass_of($classname, 'BackBee\Bundle\BundleInterface')) {
            throw new InvalidArgumentException(
                "Bundles must implement `BackBee\Bundle\BundleInterface`, `$classname` does not."
            );
        }

        $definition = new Definition($classname, array(new Reference('bbapp'), $bundleId, $baseDir));
        $definition->addTag('bundle', array('dispatch_event' => false));
        $definition->addMethodCall('start');
        $definition->addMethodCall('started');

        return $definition;
    }
private function buildBundleDefinition($classname, $bundleId, $baseDir)
    {
        if (false === is_subclass_of($classname, 'BackBee\Bundle\BundleInterface')) {
            throw new InvalidArgumentException(
                "Bundles must implement `BackBee\Bundle\BundleInterface`, `$classname` does not."
            );
        }

        $definition = new Definition($classname, array(new Reference('bbapp'), $bundleId, $baseDir));
        $definition->addTag('bundle', array('dispatch_event' => false));
        $definition->addMethodCall('start');
        $definition->addMethodCall('started');

        return $definition;
    }
private function buildBundleDefinition ( $ classname , $ bundleId , $ baseDir ) { if ( false === is_subclass_of ( $ classname , 'BackBee\Bundle\BundleInterface' ) ) { throw new InvalidArgumentException ( "Bundles must implement `BackBee\Bundle\BundleInterface`, `$classname` does not." ) ; } $ definition = new Definition ( $ classname , array ( new Reference ( 'bbapp' ) , $ bundleId , $ baseDir ) ) ; $ definition -> addTag ( 'bundle' , array ( 'dispatch_event' => false ) ) ; $ definition -> addMethodCall ( 'start' ) ; $ definition -> addMethodCall ( 'started' ) ; return $ definition ; }
Builds and return bundle definition.

@param string $classname The bundle entry point classname
@param string $bundleId  The bundle id/name
@param string $baseDir   The bundle base directory

@return \Symfony\Component\DependencyInjection\Definition

@throws InvalidArgumentException if provided classname does not implements BackBee\Bundle\BundleInterface
Builds and return bundle definition .