PHP Class Neos\Media\Domain\Service\ThumbnailService

Note that this repository is not part of the public API. Use the asset's getThumbnail() method instead.
Afficher le fichier Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$imageService ImageService
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$presets boolean
$resourceManager Neos\Flow\ResourceManagement\ResourceManager
$systemLogger Neos\Flow\Log\SystemLoggerInterface
$thumbnailCache array
$thumbnailRepository Neos\Media\Domain\Repository\ThumbnailRepository

Méthodes publiques

Méthode Description
getPresets ( ) : array
getThumbnail ( Neos\Media\Domain\Model\AssetInterface $asset, ThumbnailConfiguration $configuration ) : Neos\Media\Domain\Model\ImageInterface Returns a thumbnail of the given asset
getThumbnailConfigurationForPreset ( string $preset, boolean $async = false ) : ThumbnailConfiguration
getUriForThumbnail ( Neos\Media\Domain\Model\ImageInterface $thumbnail ) : string
refreshThumbnail ( Thumbnail $thumbnail ) : void Refreshes a thumbnail and persists the thumbnail

Méthodes protégées

Méthode Description
emitThumbnailCreated ( Thumbnail $thumbnail ) : void Signals that a thumbnail was created.

Method Details

emitThumbnailCreated() protected méthode

Signals that a thumbnail was created.
protected emitThumbnailCreated ( Thumbnail $thumbnail ) : void
$thumbnail Neos\Media\Domain\Model\Thumbnail
Résultat void

getPresets() public méthode

public getPresets ( ) : array
Résultat array Returns preset configuration for all presets

getThumbnail() public méthode

If the maximum width / height is not specified or exceeds the original asset's dimensions, the width / height of the original asset is used.
public getThumbnail ( Neos\Media\Domain\Model\AssetInterface $asset, ThumbnailConfiguration $configuration ) : Neos\Media\Domain\Model\ImageInterface
$asset Neos\Media\Domain\Model\AssetInterface The asset to render a thumbnail for
$configuration Neos\Media\Domain\Model\ThumbnailConfiguration
Résultat Neos\Media\Domain\Model\ImageInterface

getThumbnailConfigurationForPreset() public méthode

public getThumbnailConfigurationForPreset ( string $preset, boolean $async = false ) : ThumbnailConfiguration
$preset string The preset identifier
$async boolean
Résultat Neos\Media\Domain\Model\ThumbnailConfiguration

getUriForThumbnail() public méthode

public getUriForThumbnail ( Neos\Media\Domain\Model\ImageInterface $thumbnail ) : string
$thumbnail Neos\Media\Domain\Model\ImageInterface
Résultat string

refreshThumbnail() public méthode

Refreshes a thumbnail and persists the thumbnail
public refreshThumbnail ( Thumbnail $thumbnail ) : void
$thumbnail Neos\Media\Domain\Model\Thumbnail
Résultat void

Property Details

$imageService protected_oe property

protected ImageService,Neos\Media\Domain\Service $imageService
Résultat ImageService

$persistenceManager protected_oe property

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
Résultat Neos\Flow\Persistence\PersistenceManagerInterface

$presets protected_oe property

protected bool $presets
Résultat boolean

$resourceManager protected_oe property

protected ResourceManager,Neos\Flow\ResourceManagement $resourceManager
Résultat Neos\Flow\ResourceManagement\ResourceManager

$systemLogger protected_oe property

protected SystemLoggerInterface,Neos\Flow\Log $systemLogger
Résultat Neos\Flow\Log\SystemLoggerInterface

$thumbnailCache protected_oe property

protected array $thumbnailCache
Résultat array

$thumbnailRepository protected_oe property

protected ThumbnailRepository,Neos\Media\Domain\Repository $thumbnailRepository
Résultat Neos\Media\Domain\Repository\ThumbnailRepository