PHP Class Spatie\MediaLibrary\Conversion\ConversionCollection

Inheritance: extends Illuminate\Support\Collection
Mostra file Open project: spatie/laravel-medialibrary Class Usage Examples

Public Methods

Method Description
createForMedia ( Media $media ) : static
getByName ( string $name ) : mixed Get a conversion by it's name.
getConversions ( string $collectionName = '' ) Get all the conversions in the collection.
getConversionsFiles ( string $collectionName = '' ) : ConversionCollection Return the list of conversion files.
getNonQueuedConversions ( string $collectionName = '' ) : ConversionCollection * Get all the conversions in the collection that should not be queued.
getQueuedConversions ( string $collectionName = '' ) : ConversionCollection * Get all the conversions in the collection that should be queued.
setMedia ( Media $media )

Protected Methods

Method Description
addConversionsFromRelatedModel ( Media $media ) Add the conversion that are defined on the related model of the given media.
addManipulationToConversion ( array $manipulation, string $conversionName ) * Add the given manipulation to the conversion with the given name.
addManipulationsFromDb ( Media $media ) Add the extra manipulations that are defined on the given media.

Method Details

addConversionsFromRelatedModel() protected method

Add the conversion that are defined on the related model of the given media.
protected addConversionsFromRelatedModel ( Media $media )
$media Spatie\MediaLibrary\Media

addManipulationToConversion() protected method

* Add the given manipulation to the conversion with the given name.
protected addManipulationToConversion ( array $manipulation, string $conversionName )
$manipulation array
$conversionName string

addManipulationsFromDb() protected method

Add the extra manipulations that are defined on the given media.
protected addManipulationsFromDb ( Media $media )
$media Spatie\MediaLibrary\Media

createForMedia() public static method

public static createForMedia ( Media $media ) : static
$media Spatie\MediaLibrary\Media
return static

getByName() public method

Get a conversion by it's name.
public getByName ( string $name ) : mixed
$name string
return mixed

getConversions() public method

Get all the conversions in the collection.
public getConversions ( string $collectionName = '' )
$collectionName string

getConversionsFiles() public method

Return the list of conversion files.
public getConversionsFiles ( string $collectionName = '' ) : ConversionCollection
$collectionName string
return ConversionCollection

getNonQueuedConversions() public method

* Get all the conversions in the collection that should not be queued.
public getNonQueuedConversions ( string $collectionName = '' ) : ConversionCollection
$collectionName string
return ConversionCollection

getQueuedConversions() public method

* Get all the conversions in the collection that should be queued.
public getQueuedConversions ( string $collectionName = '' ) : ConversionCollection
$collectionName string
return ConversionCollection

setMedia() public method

public setMedia ( Media $media )
$media Spatie\MediaLibrary\Media