WireMarkupRegions::mergeTags()

Merge attributes from one HTML tag to another

  • Attributes (except class) that appear in $mergeTag replace those in $htmlTag.
  • Attributes in $mergeTag not already present in $htmlTag are added to it.
  • Class attribute is combined with all classes from $htmlTag and $mergeTag.
  • The tag name from $htmlTag is used, and the one from $mergeTag is ignored.

Usage

$string = $wireMarkupRegions->mergeTags(string $htmlTag, $mergeTag);

Arguments

NameType(s)Description
$htmlTagstring

HTML tag string, optionally containing attributes

$mergeTagarray string

HTML tag to merge (or attributes array)

Return value

string

Updated HTML tag string with merged attributes


WireMarkupRegions methods and properties

API reference based on ProcessWire core version 3.0.268