X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fdraggableviews%2Fsrc%2FPlugin%2Fmigrate%2Fdestination%2FDraggableViews.php;fp=web%2Fmodules%2Fcontrib%2Fdraggableviews%2Fsrc%2FPlugin%2Fmigrate%2Fdestination%2FDraggableViews.php;h=92f5e9f04af4d6d89ffa87e459564b51e9929d80;hp=0000000000000000000000000000000000000000;hb=1fed477e46533140ff15ce8064f4fbf354419c1c;hpb=58360fba03c880fb30fb0670e485a7a07d028597 diff --git a/web/modules/contrib/draggableviews/src/Plugin/migrate/destination/DraggableViews.php b/web/modules/contrib/draggableviews/src/Plugin/migrate/destination/DraggableViews.php new file mode 100644 index 000000000..92f5e9f04 --- /dev/null +++ b/web/modules/contrib/draggableviews/src/Plugin/migrate/destination/DraggableViews.php @@ -0,0 +1,82 @@ + $row->getDestinationProperty('view_name'), + 'view_display' => $row->getDestinationProperty('view_display'), + 'args' => $row->getDestinationProperty('args'), + 'entity_id' => $row->getDestinationProperty('entity_id'), + 'weight' => $row->getDestinationProperty('weight'), + 'parent' => $row->getDestinationProperty('parent'), + ]; + $result = Database::getConnection()->insert('draggableviews_structure')->fields($record)->execute(); + return array($result); + } + + /** + * {@inheritdoc} + */ + public function getIds() { + return [ + 'dvid' => [ + 'type' => 'integer', + ], + ]; + } + + /** + * {@inheritdoc} + */ + public function fields(MigrationInterface $migration = NULL) { + return [ + 'dvid' => $this->t('The primarty identifier'), + 'view_name' => $this->t('The view name.'), + 'view_display' => $this->t('The view display.'), + 'args' => $this->t('The arguments.'), + 'entity_id' => $this->t('The entity id.'), + 'weight' => $this->t('The order weight.'), + 'parent' => $this->t('The parent entity id.'), + ]; + } + +}