"Fossies" - the Fresh Open Source Software Archive

Member "neos-development-collection-7.0.1/Neos.Neos/Resources/Private/Fusion/Prototypes/ImageUri.fusion" (23 Feb 2021, 1677 Bytes) of package /linux/www/neos-development-collection-7.0.1.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "ImageUri.fusion": 7.0.0_vs_7.0.1.

    1 # ImageUri object works exactly the same way as the uri.image ViewHelper in the Neos.Media package
    2 prototype(Neos.Neos:ImageUri) {
    3   @class = 'Neos\\Neos\\Fusion\\ImageUriImplementation'
    4   maximumWidth = 2560
    5   width = NULL
    6   maximumHeight = 2560
    7   height = NULL
    8   allowCropping = false
    9   allowUpScaling = false
   10   async = false
   11   quality = NULL
   12   format = NULL
   13   preset = NULL
   14   @exceptionHandler = 'Neos\\Fusion\\Core\\ExceptionHandlers\\AbsorbingHandler'
   15 }
   16 
   17 # ImageTag object works exactly the same way as image ViewHelper in the Neos.Media package
   18 prototype(Neos.Neos:ImageTag) < prototype(Neos.Fusion:Tag) {
   19   asset = 'pass-the-media-asset'
   20   maximumWidth = 2560
   21   width = NULL
   22   maximumHeight = 2560
   23   height = NULL
   24   allowCropping = false
   25   allowUpScaling = false
   26   async = false
   27   preset = NULL
   28   @context.asset = ${this.asset}
   29   @context.width = ${this.width}
   30   @context.maximumWidth = ${this.maximumWidth}
   31   @context.height = ${this.height}
   32   @context.maximumHeight = ${this.maximumHeight}
   33   @context.allowCropping = ${this.allowCropping}
   34   @context.allowUpScaling = ${this.allowUpScaling}
   35   @context.async = ${this.async}
   36   @context.quality = ${this.quality}
   37   @context.format = ${this.format}
   38   @context.preset = ${this.preset}
   39 
   40   tagName = 'img'
   41   attributes {
   42     loading = 'lazy'
   43     alt = ''
   44     src = Neos.Neos:ImageUri {
   45       asset = ${asset}
   46       width = ${width}
   47       maximumWidth = ${maximumWidth}
   48       height = ${height}
   49       maximumHeight = ${maximumHeight}
   50       allowCropping = ${allowCropping}
   51       allowUpScaling = ${allowUpScaling}
   52       async = ${async}
   53       quality = ${quality}
   54       format = ${format}
   55       preset = ${preset}
   56     }
   57   }
   58 }