Skip to content
Snippets Groups Projects
Commit 32963c28 authored by totten's avatar totten
Browse files

CRM_Utils_Migrate_Import - Extract runXmlElement() for use with dynamic XML. Add docs.

parent 8080d1e0
No related branches found
No related tags found
No related merge requests found
......@@ -36,8 +36,14 @@ class CRM_Utils_Migrate_Import {
function __construct() {
}
/**
* Import custom-data from an XML file
*
* @param string $file path to an XML file
* @throws CRM_Core_Exception
* @return void;
*/
function run($file) {
// read xml file
$dom = new DomDocument();
if (! $dom->load($file)) {
......@@ -45,7 +51,16 @@ class CRM_Utils_Migrate_Import {
}
$dom->xinclude();
$xml = simplexml_import_dom($dom);
return $this->runXmlElement($xml);
}
/**
* Import custom-data from an XML element
*
* @param SimpleXMLElement $xml
* @return void
*/
function runXmlElement($xml) {
$idMap = array(
'custom_group' => array(),
'option_group' => array(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment