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
| Name | Type(s) | Description |
|---|---|---|
$htmlTag | string | HTML tag string, optionally containing attributes |
$mergeTag | array string | HTML tag to merge (or attributes array) |
Return value
stringUpdated HTML tag string with merged attributes
WireMarkupRegions methods and properties
API reference based on ProcessWire core version 3.0.268