Documentation · ViewHelper reference

XSD schema file | vhs master

Format / ReplaceViewHelper

Replaces $substring in $content with $replacement. /

  • Tag usage example

    <v:format.replace content="NULL" substring="NULL" replacement="''" count="123" caseSensitive="1">
    	<!-- tag content - may be ignored! -->
    </v:format.replace>
  • Inline usage example

    {v:format.replace(content: 'NULL', substring: 'NULL', replacement: '''', count: 123, caseSensitive: 1)}

Arguments

Argument Description Type
caseSensitive

If true, perform case-sensitive replacement

boolean
content

Content in which to perform replacement

string
count

Maximum number of times to perform replacement

integer
replacement

Replacement to insert

string
substring

Substring to replace

string
Required attribute

Revision history

commit cd3e4b67f14693349bb68a6de5f9ba74265bad6d
Author: Claus Due <*****@wildside.dk>
Date:   Thu Nov 29 21:32:05 2012 +0100

    [FEATURE] Format / Replace ViewHelper
    
    Interface for str_replace with default replacement value being an empty string.

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