Documentation · ViewHelper reference

Format / CaseViewHelper


Modifies the case of an input string to upper- or lowercase or capitalization.
The default transformation will be uppercase as in ``mb_convert_case`` [1].
Possible modes are: ``lower`` Transforms the input string to its lowercase representation ``upper`` Transforms the input string to its uppercase representation ``capital`` Transforms the input string to its first letter upper-cased, i.e. capitalization ``uncapital`` Transforms the input string to its first letter lower-cased, i.e. uncapitalization ``capitalWords`` Not supported yet: Transforms the input string to each containing word being capitalized
Note that the behavior will be the same as in the appropriate PHP function ``mb_convert_case`` [1];
especially regarding locale and multibyte behavior.
  • Tag usage example

    <f:format.case value="NULL" mode="'upper'">
    	<!-- tag content - may be ignored! -->
    </f:format.case>
  • Inline usage example

    {f:format.case(value: 'NULL', mode: ''upper'')}

Arguments

Argument Description Type
mode

The case to apply, must be one of this' CASE_* constants. Defaults to uppercase application

string
value

The input value. If not given, the evaluated child nodes will be used

string
Required attribute

Revision history

commit b9ce9edbc038b6e089b55123d6f02266acdc07a1
Author: Claus Due <*****@wildside.dk>
Date:   Tue Jan 8 11:25:51 2013 +0100

    [FEATURE] Format / Case ViewHelper
    
    Accepts multiple formatting instructions to change the case of entire strings, words or initial letters only.

commit 6d487b78d2bfb8fd558cd4ed7989ec253b3de3b1
Author: Claus Due <*****@wildside.dk>
Date:   Mon Aug 12 23:15:22 2013 +0200

    [FEATURE] Add additional case formatters to Format / Case

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

    [TASK] Happy new year!

commit d2e531da034976e6db1478eef5a8478595fd16fe
Author: Claus Due <*****@namelesscoder.net>
Date:   Sun Jan 5 00:45:10 2014 +0100

    [TASK] Migrate to using namespace core class names

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

    [TASK] CGL compliance

commit 09c3ad8452321b95b32ef3f88e9f26e70fb9aaea
Author: Danilo Bürger <*****@hmspl.de>
Date:   Mon Apr 28 15:38:57 2014 +0200

    [BUGFIX] Use charset when formatting

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

    [TASK] Switch to namespaces

commit 16fc7612fc7212be82c4349557cacc8e5ed40120
Author: Xaver Maierhofer <*****@xwissen.info>
Date:   Mon Jun 9 01:36:47 2014 +0200

    [BUGFIX] Provide TSFE in v:format.case in BE
    BE doesn't provide $GLOBALS['TSFE']->csConvObj and format caseViewhelper relays on it

commit 716b251b6470782dbc09ca6e883b00cb75e5e440
Author: Claus Due <*****@namelesscoder.net>
Date:   Thu Jan 15 04:52:28 2015 +0100

    [TASK] More test ports

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

    [TASK] Reference Copyright to license.md file