PHP Класс Neos\Media\ViewHelpers\Uri\ThumbnailViewHelper

= Examples = {typo3.media:uri.thumbnail(asset: assetObject)} (depending on the asset) _Resources/Persistent/b29[...]95d.jpeg {typo3.media:uri.thumbnail(asset: assetObject, maximumWidth: 80)} (depending on the asset; has scaled keeping the aspect ratio) _Resources/Persistent/b29[...]95d.jpeg
См. также: Neos\Media\ViewHelpers\ThumbnailViewHelper
Наследование: extends Neos\FluidAdaptor\Core\ViewHelper\AbstractViewHelper
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$assetService Neos\Media\Domain\Service\AssetService
$resourceManager Neos\Flow\ResourceManagement\ResourceManager
$thumbnailService Neos\Media\Domain\Service\ThumbnailService

Открытые методы

Метод Описание
render ( Neos\Media\Domain\Model\AssetInterface $asset = null, integer $width = null, integer $maximumWidth = null, integer $height = null, integer $maximumHeight = null, boolean $allowCropping = false, boolean $allowUpScaling = false, boolean $async = false, string $preset = null ) : string Renders the path to a thumbnail image, created from a given asset.

Описание методов

render() публичный Метод

Renders the path to a thumbnail image, created from a given asset.
public render ( Neos\Media\Domain\Model\AssetInterface $asset = null, integer $width = null, integer $maximumWidth = null, integer $height = null, integer $maximumHeight = null, boolean $allowCropping = false, boolean $allowUpScaling = false, boolean $async = false, string $preset = null ) : string
$asset Neos\Media\Domain\Model\AssetInterface
$width integer Desired width of the thumbnail
$maximumWidth integer Desired maximum width of the thumbnail
$height integer Desired height of the thumbnail
$maximumHeight integer Desired maximum height of the thumbnail
$allowCropping boolean Whether the thumbnail should be cropped if the given sizes would hurt the aspect ratio
$allowUpScaling boolean Whether the resulting thumbnail size might exceed the size of the original asset
$async boolean Return asynchronous image URI in case the requested image does not exist already
$preset string Preset used to determine image configuration
Результат string the relative thumbnail path, to be used as src attribute for tags

Описание свойств

$assetService защищенное свойство

protected AssetService,Neos\Media\Domain\Service $assetService
Результат Neos\Media\Domain\Service\AssetService

$resourceManager защищенное свойство

protected ResourceManager,Neos\Flow\ResourceManagement $resourceManager
Результат Neos\Flow\ResourceManagement\ResourceManager

$thumbnailService защищенное свойство

protected ThumbnailService,Neos\Media\Domain\Service $thumbnailService
Результат Neos\Media\Domain\Service\ThumbnailService