PHP Class Neos\Media\ViewHelpers\ImageViewHelper

= Examples = (depending on the image, no scaling applied) a sample image without scaling (depending on the image; scaled down to a maximum width of 80 pixels, keeping the aspect ratio) sample (depending on the image; scaled down to a maximum width and height of 80 pixels, keeping the aspect ratio) sample (depending on the image; scaled down to a width and height of 80 pixels, possibly changing aspect ratio) sample (depending on the image; scaled up or down to a width 5000 pixels, keeping aspect ratio) sample
Inheritance: extends Neos\FluidAdaptor\Core\ViewHelper\AbstractTagBasedViewHelper
Afficher le fichier Open project: neos/neos-development-collection

Protected Properties

Свойство Type Description
$assetService Neos\Media\Domain\Service\AssetService
$tagName string name of the tag to be created by this view helper
$thumbnailService Neos\Media\Domain\Service\ThumbnailService

Méthodes publiques

Méthode Description
initializeArguments ( ) : void
render ( Neos\Media\Domain\Model\ImageInterface $image = 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 an HTML img tag with a thumbnail image, created from a given image.

Method Details

initializeArguments() public méthode

public initializeArguments ( ) : void
Résultat void

render() public méthode

Renders an HTML img tag with a thumbnail image, created from a given image.
public render ( Neos\Media\Domain\Model\ImageInterface $image = 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
$image Neos\Media\Domain\Model\ImageInterface The image to be rendered as an image
$width integer Desired width of the image
$maximumWidth integer Desired maximum width of the image
$height integer Desired height of the image
$maximumHeight integer Desired maximum height of the image
$allowCropping boolean Whether the image should be cropped if the given sizes would hurt the aspect ratio
$allowUpScaling boolean Whether the resulting image size might exceed the size of the original image
$async boolean Return asynchronous image URI in case the requested image does not exist already
$preset string Preset used to determine image configuration
Résultat string an html tag

Property Details

$assetService protected_oe property

protected AssetService,Neos\Media\Domain\Service $assetService
Résultat Neos\Media\Domain\Service\AssetService

$tagName protected_oe property

name of the tag to be created by this view helper
protected string $tagName
Résultat string

$thumbnailService protected_oe property

protected ThumbnailService,Neos\Media\Domain\Service $thumbnailService
Résultat Neos\Media\Domain\Service\ThumbnailService