public function executeCustomDataTemplateFile($relativePath) { $smarty = CRM_Core_Smarty::singleton(); $xmlCode = $smarty->fetch($relativePath); //x dpm($xmlCode); $xml = simplexml_load_string($xmlCode); require_once 'CRM/Utils/Migrate/Import.php'; $import = new CRM_Utils_Migrate_Import(); $import->runXmlElement($xml); return TRUE; }