PerfMigrate.dpresse.inc 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * PerfGroupeNodeMigration
  4. *
  5. */
  6. class PerfDpressNodeMigration extends PerfDocsNodeMigration {
  7. public function __construct() {
  8. $this->description = t('Migrate Document Presse Class');
  9. $this->fields = array(
  10. 'fichier_pdf' => t('fichier_pdf'),
  11. 'resume_retranscription' => t('resume_retranscription'),
  12. );
  13. $this->itemsfile = 'baseperf-dpress.xml';
  14. $this->item_xpath = '/ROOT/ITEMS/DOC_PRESSE'; // relative to document
  15. parent::__construct();
  16. $this->addFieldMapping('field_type')->defaultValue('presse');
  17. $this->addFieldMapping('field_fichier_pdf', 'fichier_pdf')
  18. ->xpath('@FICHIER_PDF');
  19. $this->addFieldMapping('field_resume_retranscription', 'fichier_pdf')
  20. ->xpath('@RESUME_RETRANSCRIPTION');
  21. $this->addFieldMapping('field_resume_retranscription:format')->defaultValue('filtred_html');
  22. $this->addUnmigratedDestinations(array(
  23. 'field_fichier_pdf:language', 'field_fichier_pdf:format',
  24. 'field_resume_retranscription:language',
  25. ));
  26. }
  27. // public function prepareRow($row){
  28. // // $xml = $row->xml;
  29. // parent::prepareRow($row);
  30. //
  31. //
  32. // }
  33. }