Documentation · ViewHelper reference

XSD schema file | vhs master

Math / MinimumViewHelper

Math: Minimum

Gets the lowest number in array $a or the lowest number of numbers $a and $b. /

  • Tag usage example

    <v:math.minimum a="[mixed]" fail="1" b="[mixed]">
    	<!-- tag content - may be ignored! -->
    </v:math.minimum>
  • Inline usage example

    {v:math.minimum(a: [mixed], fail: 1, b: [mixed])}

Arguments

Argument Description Type
a

First number for calculation

mixed
b

Second number or Iterator/Traversable/Array for calculation

mixed
fail

If TRUE, throws an Exception if argument "a" is not specified and no child content or inline argument is found. Usually okay to use a NULL value (as integer zero).

boolean
Required attribute

Revision history

commit e413d414c835bc1a6d8853cc38cb78e04549f80a
Author: Claus Due <*****@wildside.dk>
Date:   Sat Nov 24 23:55:24 2012 +0100

    [FEATURE] Math / Minimum ViewHelper

commit da31bad1d9bb058c072ddb5591e8ed907a1ae8e1
Author: Claus Due <*****@namelesscoder.net>
Date:   Tue Dec 31 23:08:37 2013 +0100

    [TASK] Happy new year!

commit 036292f864724785583e1c92079a55af680af46c
Author: Claus Due <*****@namelesscoder.net>
Date:   Mon Feb 3 18:17:26 2014 +0100

    [TASK] Make "b" argument on math.minimum and .maximum optional
    
    When "a" is an array, max() and min() will work with just the array as argument. The ViewHelper, however, required a "b" argument which could never be NULL and thus prevented using only the "a" argument.

commit 52bd6e41ccfef3d8193b350153912a9716e6a087
Author: Benjamin Rau <*****@codearts.at>
Date:   Tue Apr 1 21:09:00 2014 +0200

    [TASK] CGL compliance

commit da7677bc74f14e9a9300e4ba4487e52c3cb97642
Author: Claus Due <*****@namelesscoder.net>
Date:   Sun Apr 20 01:13:33 2014 +0200

    [TASK] Switch to namespaces

commit 8bb2fc5ee124ba19b0a0ab8e061c9a153fc4651f
Author: Xaver Maierhofer <*****@xwissen.info>
Date:   Sun Jan 18 17:56:13 2015 +0100

    [TASK] Reference Copyright to license.md file