You are here

function _uc_importer_export_classes in Ubercart 5

Export product node types as XML.

1 call to _uc_importer_export_classes()
uc_importer_export in uc_importer/uc_importer.module
Constructs the XML representation of the store from the ids given.

File

uc_importer/uc_importer.module, line 541
XML product importer and exporter.

Code

function _uc_importer_export_classes($classes) {
  $xml = '<classes>';
  foreach ($classes as $pcid) {
    $class = uc_product_class_load($pcid);
    $xml .= '<class>';
    $xml .= '<id>' . $class->pcid . '</id>';
    $xml .= '<name>' . htmlspecialchars($class->name, ENT_QUOTES, "UTF-8") . '</name>';
    $xml .= '<description>' . htmlspecialchars($class->description, ENT_QUOTES, "UTF-8") . '</description>';
    $xml .= uc_importer_invoke('export', 'class', $pcid);
    $xml .= '</class>';
  }
  $xml .= '</classes>';
  return $xml;
}