FluidTYPO3\Vhs\Traits\SourceSetViewHelperTrait::getSourceSetWidths PHP Method

getSourceSetWidths() public method

returns an array of srcsets based on the mixed ViewHelper input (list, csv, array, iterator)
public getSourceSetWidths ( ) : array
return array
    public function getSourceSetWidths()
    {
        $srcsets = $this->arguments['srcset'];
        if (true === $srcsets instanceof \Traversable) {
            $srcsets = iterator_to_array($srcsets);
        } elseif (true === is_string($srcsets)) {
            $srcsets = GeneralUtility::trimExplode(',', $srcsets, true);
        } else {
            $srcsets = (array) $srcsets;
        }
        return $srcsets;
    }