public function cf_dom::p_get_markup in Common Functionality 7.2
Converts the element into markup
Parameters
bool $include_tag: (optional) When TRUE, the head tag itself will be included in the output. When FALSE, only the contents of the tag will be included in the output. Defaults to FALSE.
DOMNode $parent: The object to operate on.
Return value
string|bool The markup text that the object was converted from. FALSE on error.
2 calls to cf_dom::p_get_markup()
- cf_dom::get_markup in modules/
cf_dom/ classes/ cf_dom.php - Converts the body or head element into markup
- cf_dom::get_tag_markup in modules/
cf_dom/ classes/ cf_dom.php - Converts the selected tag into HTML markup.
File
- modules/
cf_dom/ classes/ cf_dom.php, line 521 - Provides the cf_dom handling class.
Class
- cf_dom
- The cf_dom class assists in setting up and managing the custom dom object.
Code
public function p_get_markup($include_tag, $parent) {
if ($include_tag) {
return $this->dom
->saveHTML($parent);
}
$markup = '';
if ($parent
->hasChildNodes() > 0) {
foreach ($parent->childNodes as $child) {
$markup .= $this->dom
->saveHTML($child);
}
}
return $markup;
}