PHP Трейт FluidTYPO3\Vhs\Traits\SourceSetViewHelperTrait

Показать файл Открыть проект

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

Метод Описание
addSourceSet ( TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder $tag, string $src ) : array used to attach srcset variants of a given image to the specified tag
getImgResource ( string $src, integer $width, string $format, string $quality, string $treatIdAsReference, array $params = null ) : string generates a copy of a give image with a specific width
getSourceSetWidths ( ) : array returns an array of srcsets based on the mixed ViewHelper input (list, csv, array, iterator)

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

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

used to attach srcset variants of a given image to the specified tag
public addSourceSet ( TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder $tag, string $src ) : array
$tag TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder the tag to add the srcset as argument
$src string image path to render srcsets for
Результат array

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

generates a copy of a give image with a specific width
public getImgResource ( string $src, integer $width, string $format, string $quality, string $treatIdAsReference, array $params = null ) : string
$src string path of the image to convert
$width integer width to convert the image to
$format string format of the resulting copy
$quality string quality of the resulting copy
$treatIdAsReference string given src argument is a sys_file_reference record
$params array additional params for the image rendering
Результат string

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

returns an array of srcsets based on the mixed ViewHelper input (list, csv, array, iterator)
public getSourceSetWidths ( ) : array
Результат array