/** * returns the list of fields that can be imported * * @access public * return array */ function &import($prefix = false) { if (!$GLOBALS['_CRM_CORE_DAO_LOCATION']['_import']) { $GLOBALS['_CRM_CORE_DAO_LOCATION']['_import'] = array(); $fields =& CRM_Core_DAO_Location::fields(); foreach ($fields as $name => $field) { if (CRM_Utils_Array::value('import', $field)) { if ($prefix) { $GLOBALS['_CRM_CORE_DAO_LOCATION']['_import']['location'] =& $fields[$name]; } else { $GLOBALS['_CRM_CORE_DAO_LOCATION']['_import'][$name] =& $fields[$name]; } } } $GLOBALS['_CRM_CORE_DAO_LOCATION']['_import'] = array_merge($GLOBALS['_CRM_CORE_DAO_LOCATION']['_import'], CRM_Core_DAO_LocationType::import(true)); } return $GLOBALS['_CRM_CORE_DAO_LOCATION']['_import']; }