DataCollector/AsseticDataCollector.php
public function collect(Request $request, Response $response, \Exception $exception = null)
    {
        $collections = array();

        foreach ($this->getAssetManager()->getNames() as $name) {
            $collection = $this->getAssetManager()->get($name);
            $assets = array();
            $filters = array();

            foreach ($collection->all() as $asset) {
                $assets[] = $asset->getSourcePath();
            }

            foreach ($collection->getFilters() as $filter) {
                $filters[] = get_class($filter);
            }

            $collections[$name] = array(
                'target' => $collection->getTargetPath(),
                'assets' => $assets,
                'filters' => $filters
            );
        }

        $this->data['collections'] = $collections;
    }
public function collect(Request $request, Response $response, \Exception $exception = null)
    {
        $collections = array();

        foreach ($this->getAssetManager()->getNames() as $name) {
            $collection = $this->getAssetManager()->get($name);
            $assets = array();
            $filters = array();

            foreach ($collection->all() as $asset) {
                $assets[] = $asset->getSourcePath();
            }

            foreach ($collection->getFilters() as $filter) {
                $filters[] = get_class($filter);
            }

            $collections[$name] = array(
                'target' => $collection->getTargetPath(),
                'assets' => $assets,
                'filters' => $filters
            );
        }

        $this->data['collections'] = $collections;
    }
public function collect ( Request $ request , Response $ response , \ Exception $ exception = null ) { $ collections = array ( ) ; foreach ( $ this -> getAssetManager ( ) -> getNames ( ) as $ name ) { $ collection = $ this -> getAssetManager ( ) -> get ( $ name ) ; $ assets = array ( ) ; $ filters = array ( ) ; foreach ( $ collection -> all ( ) as $ asset ) { $ assets [ ] = $ asset -> getSourcePath ( ) ; } foreach ( $ collection -> getFilters ( ) as $ filter ) { $ filters [ ] = get_class ( $ filter ) ; } $ collections [ $ name ] = array ( 'target' => $ collection -> getTargetPath ( ) , 'assets' => $ assets , 'filters' => $ filters ) ; } $ this -> data [ 'collections' ] = $ collections ; }
Collect assets informations from Assetic Asset Manager

@param Request    $request   The Request Object
@param Response   $response  The Response Object
@param \Exception $exception Exception
Collect assets informations from Assetic Asset Manager