Documentation · ViewHelper reference

XSD schema file | vhs master

Format / EliminateViewHelper

Character/string/whitespace elimination ViewHelper

There is no example - each argument describes how it should be used and arguments can be used individually or in any combination. /

  • Tag usage example

    <v:format.eliminate content="NULL" caseSensitive="1" characters="[mixed]" strings="[mixed]" whitespace="1" whitespaceBetweenHtmlTags="1" tabs="1" unixBreaks="1" windowsBreaks="1" digits="1" letters="1" nonAscii="1">
    	<!-- tag content - may be ignored! -->
    </v:format.eliminate>
  • Inline usage example

    {v:format.eliminate(content: 'NULL', caseSensitive: 1, characters: [mixed], strings: [mixed], whitespace: 1, whitespaceBetweenHtmlTags: 1, tabs: 1, unixBreaks: 1, windowsBreaks: 1, digits: 1, letters: 1, nonAscii: 1)}

Arguments

Argument Description Type
caseSensitive

Wether or not to perform case sensitive replacement

boolean
characters

Characters to remove. Array or string, i.e. {0: 'a', 1: 'b', 2: 'c'} or 'abc' to remove all occurrences of a, b and c

mixed
content

String in which to perform replacement

string
digits

Eliminates all number characters (but not the dividers between floats converted to strings)

boolean
letters

Eliminates all letters (non-numbers, non-whitespace, non-syntactical)

boolean
nonAscii

Eliminates any ASCII char

boolean
strings

Strings to remove. Array or CSV, i.e. {0: 'foo', 1: 'bar'} or 'foo,bar' to remove all occorrences of foo and bar. If your strings overlap then place the longest match first

mixed
tabs

Eliminate only tab whitespaces

boolean
unixBreaks

Eliminate only UNIX line breaks

boolean
whitespace

Eliminate ALL whitespace characters

boolean
whitespaceBetweenHtmlTags

Eliminate ALL whitespace characters between HTML tags

boolean
windowsBreaks

Eliminates only Windows carriage returns

boolean
Required attribute

Revision history

commit 39671719b37f10ee4790070aa213c308ab466c9c
Author: Claus Due <*****@wildside.dk>
Date:   Sat Nov 3 22:15:03 2012 +0100

    [FEATURE] Formatting ViewHelpers
    
    Eliminate, Hide, Markdown and Ucfirst ViewHelpers.

commit 6e343b133ae057eb43d8dbb10975f1630aa7afee
Author: Claus Due <*****@wildside.dk>
Date:   Sun Dec 2 20:13:26 2012 +0100

    [TASK] Coding guideline cleanup

commit 15d2218166da31c0d074b4ccbbcd2c7b1b051c8d
Author: Björn Fromme <*****@bjo3rn.com>
Date:   Tue Jan 15 23:06:08 2013 +0100

    [BUGFIX] Fix typo causing fatal error

commit 788e205768c128c2a25b08693176390fd0984c3d
Author: Björn Fromme <*****@bjo3rn.com>
Date:   Sun May 26 16:04:50 2013 +0200

    [TASK] Correct variable name

commit 7659d70564bd059d697efd495fb665b53dd53ed6
Author: Björn Fromme <*****@bjo3rn.com>
Date:   Sun May 26 16:05:13 2013 +0200

    [TASK] Remove superfluous quotes

commit db3cd7ddbffc430b6a108159cfc70dbe141e5410
Author: Claus Due <*****@namelesscoder.net>
Date:   Fri Sep 13 03:08:34 2013 +0200

    [TASK] Improve test suite

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 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