public function getCollectionAction()
    {
        $application = $this->getApplication();

        $bundles = [];
        
        foreach ($this->getApplication()->getBundles() as $bundle) {
            if ($this->isGranted('EDIT', $bundle) || ($bundle->isEnabled() && $this->isGranted('VIEW', $bundle))) {
                $bundles[] = $bundle;
            }
        }

        return $this->createJsonResponse($bundles, 200, array(
            'Content-Range' => '0-'.(count($bundles) - 1).'/'.count($bundles),
        ));
    }
public function getCollectionAction()
    {
        $application = $this->getApplication();

        $bundles = [];
        
        foreach ($this->getApplication()->getBundles() as $bundle) {
            if ($this->isGranted('EDIT', $bundle) || ($bundle->isEnabled() && $this->isGranted('VIEW', $bundle))) {
                $bundles[] = $bundle;
            }
        }

        return $this->createJsonResponse($bundles, 200, array(
            'Content-Range' => '0-'.(count($bundles) - 1).'/'.count($bundles),
        ));
    }
public function getCollectionAction ( ) { $ application = $ this -> getApplication ( ) ; $ bundles = [ ] ; foreach ( $ this -> getApplication ( ) -> getBundles ( ) as $ bundle ) { if ( $ this -> isGranted ( 'EDIT' , $ bundle ) || ( $ bundle -> isEnabled ( ) && $ this -> isGranted ( 'VIEW' , $ bundle ) ) ) { $ bundles [ ] = $ bundle ; } } return $ this -> createJsonResponse ( $ bundles , 200 , array ( 'Content-Range' => '0-' . ( count ( $ bundles ) - 1 ) . '/' . count ( $ bundles ) , ) ) ; }
Returns a collection of declared bundles.

@Rest\Security("is_fully_authenticated() & has_role('ROLE_API_USER')")
Returns a collection of declared bundles .