PerfMigrate.dsons.inc 1000 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * PerfGroupeNodeMigration
  4. *
  5. */
  6. class PerfDsonsNodeMigration extends PerfDNodeMigration {
  7. public function __construct() {
  8. $this->description = t('Migrate Document Sonore Class');
  9. $this->fields = array(
  10. 'support' => t('support'),
  11. );
  12. // This can also be an URL instead of a file path.
  13. $xml_folder = DRUPAL_ROOT . '/' . drupal_get_path('module', 'PerfMigrate') . '/xml/';
  14. $this->items_url = $xml_folder . 'baseperf-dsons.xml';
  15. $this->item_xpath = '/ROOT/ITEMS/DOC_SONORE'; // relative to document
  16. $this->destination = new MigrateDestinationNode('document_sonor');
  17. parent::__construct();
  18. $this->addFieldMapping('field_support', 'support')
  19. ->xpath('@SUPPORT');
  20. $this->addUnmigratedDestinations(array('field_support:language', 'field_support:format'));
  21. }
  22. public function prepareRow($row){
  23. parent::prepareRow($row);
  24. }
  25. public function prepare($node, stdClass $row) {
  26. parent::prepare($node, $row);
  27. }
  28. }