WireMarkupRegions::replace()

Replace the region(s) that match the given $selector with the given $replace markup

Usage

// basic usage
$string = $wireMarkupRegions->replace(string $selector, string $replace, string $markup);

// usage with all arguments
$string = $wireMarkupRegions->replace(string $selector, string $replace, string $markup, array $options = []);

Arguments

NameType(s)Description
$selectorstring

See the update() method $selector argument for supported formats

$replacestring

Markup to replace with

$markupstring

Document markup where region(s) exist

$options (optional)array

See $options argument for update() method

Return value

string


WireMarkupRegions methods and properties

API reference based on ProcessWire core version 3.0.268