protected function serveDevelopmentCollection(Collection $collection, string $group, ?string $format) : string {
        $identifier = $collection->getIdentifier();

        // Before we fetch the collections manifest entry we'll try to build the collection
        // again if there is anything outstanding. This doesn't have a huge impact on
        // page loads time like trying to dynamically serve each asset.
        $this->tryDevelopmentBuild($collection, $group);

        $entry = $this->getCollectionEntry($collection);

        $responses = array();

        foreach ($collection->getAssetsWithRaw($group) as $asset) {
            if ( ! $asset->isRaw() and $path = $entry->getDevelopmentAsset($asset)) {
                $path = $this->prefixBuildPath($identifier.'/'.$path);
            } else {
                $path = $asset->getRelativePath();
            }

            $responses[] = $this->{'create'.studly_case($group).'Element'}($path, $format);
        }

        return $this->formatResponse($responses);
    }
protected function serveDevelopmentCollection(Collection $collection, string $group, ?string $format) : string {
        $identifier = $collection->getIdentifier();

        // Before we fetch the collections manifest entry we'll try to build the collection
        // again if there is anything outstanding. This doesn't have a huge impact on
        // page loads time like trying to dynamically serve each asset.
        $this->tryDevelopmentBuild($collection, $group);

        $entry = $this->getCollectionEntry($collection);

        $responses = array();

        foreach ($collection->getAssetsWithRaw($group) as $asset) {
            if ( ! $asset->isRaw() and $path = $entry->getDevelopmentAsset($asset)) {
                $path = $this->prefixBuildPath($identifier.'/'.$path);
            } else {
                $path = $asset->getRelativePath();
            }

            $responses[] = $this->{'create'.studly_case($group).'Element'}($path, $format);
        }

        return $this->formatResponse($responses);
    }
protected function serveDevelopmentCollection ( Collection $ collection , string $ group , ? string $ format ) : string { $ identifier = $ collection -> getIdentifier ( ) ; // Before we fetch the collections manifest entry we'll try to build the collection // again if there is anything outstanding. This doesn't have a huge impact on // page loads time like trying to dynamically serve each asset. $ this -> tryDevelopmentBuild ( $ collection , $ group ) ; $ entry = $ this -> getCollectionEntry ( $ collection ) ; $ responses = array ( ) ; foreach ( $ collection -> getAssetsWithRaw ( $ group ) as $ asset ) { if ( ! $ asset -> isRaw ( ) and $ path = $ entry -> getDevelopmentAsset ( $ asset ) ) { $ path = $ this -> prefixBuildPath ( $ identifier . '/' . $ path ) ; } else { $ path = $ asset -> getRelativePath ( ) ; } $ responses [ ] = $ this -> { 'create' . studly_case ( $ group ) . 'Element' } ( $ path , $ format ) ; } return $ this -> formatResponse ( $ responses ) ; }
Serve a development collection.
Serve a development collection .