Browse Source

Added a function for getting a named form.

pull/105/head
Nigel Banks 14 years ago
parent
commit
03bc6bdeff
  1. 13
      ContentModel.inc

13
ContentModel.inc

@ -2016,6 +2016,19 @@ class ContentModel extends XMLDatastream {
return $ret;
}
/**
* Find the form element with name $name.
*
* @param string $name
* The name of the form element to find.
* @return DOMElement
* The form element $name, if found FALSE otherwise.
*/
public function getForm($name) {
$result = $this->xpath->query("//cm:form[@name='$name']");
return $result->length == 1 ? $result->item(0) : FALSE;
}
/**
*
* @return array

Loading…
Cancel
Save