private function cf_dom::p_change_elements in Common Functionality 7.2
Change all elements of a given element type to another type.
Parameters
string $type: The new element type to operate on.
DOMNode $parent: The object to operate on.
Return value
bool TRUE on success, FALSE otherwise.
1 call to cf_dom::p_change_elements()
- cf_dom::change_elements in modules/
cf_dom/ classes/ cf_dom.php - Change all elements of a given element type to another type.
File
- modules/
cf_dom/ classes/ cf_dom.php, line 604 - Provides the cf_dom handling class.
Class
- cf_dom
- The cf_dom class assists in setting up and managing the custom dom object.
Code
private function p_change_elements($type, $parent) {
$result = TRUE;
$elements = $parent
->getElementsByTagName($type);
foreach ($elements as $element) {
$result = $this
->change_element($element, $type);
if (!$result) {
break;
}
}
return $result;
}