Advertisement
Guest User

Untitled

a guest
Jul 27th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. id: fm_quiz
  2. label: FM Quiz
  3. migration_group: quizzes
  4. source:
  5. plugin: fm_quiz
  6. key: source
  7. destination:
  8. plugin: fm_quiz
  9. process:
  10. type:
  11. plugin: default_value
  12. default_value: quiz
  13. title: title
  14. uid:
  15. plugin: default_value
  16. default_value: 1
  17. sticky:
  18. plugin: default_value
  19. default_value: 0
  20.  
  21. <?php
  22.  
  23. /**
  24. * @file
  25. * Contains Drupalfm_quizPluginmigratedestinationFMQuiz.
  26. */
  27.  
  28. namespace Drupalfm_quizPluginmigratedestination;
  29.  
  30. use DrupalmigratePluginmigratedestinationEntityContentBase;
  31. use DrupalmigrateRow;
  32.  
  33.  
  34. /**
  35. * @MigrateDestination(
  36. * id = "fm_quiz"
  37. * )
  38. */
  39. class FMQuiz extends EntityContentBase {
  40.  
  41. /**
  42. * {@inheritdoc}
  43. */
  44. public function import(Row $row, array $old_destination_id_values = array()) {
  45. $node = $this->getEntity($row, $old_destination_id_values);
  46. print_r($node);
  47.  
  48. return [$node->id()];
  49. }
  50.  
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement