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