diff relation_processor/FeedsRelationProcessor.inc @ 5:1c73c660c2f2

new relation_processor
author Dirk Wintergruen <dwinter@mpiwg-berlin.mpg.de>
date Wed, 17 Jun 2015 18:55:14 +0200
parents 124ef8f3b22d
children
line wrap: on
line diff
--- a/relation_processor/FeedsRelationProcessor.inc	Fri Mar 27 19:21:42 2015 +0100
+++ b/relation_processor/FeedsRelationProcessor.inc	Wed Jun 17 18:55:14 2015 +0200
@@ -137,6 +137,7 @@
    * Save a node.
    */
   public function entitySave($entity) {
+
     relation_save($entity);
   }
 
@@ -197,6 +198,22 @@
     $form = parent::configForm($form_state);
 
     $author = user_load($this->config['author']);
+
+
+    $options =$this->bundleOptions();
+      $form['bundle'] = array(
+          '#type' => 'select',
+          '#options' => $options,
+          '#title' => !empty($info['bundle name']) ? $info['bundle name'] : t('Bundle'),
+          '#required' => false,
+          '#description' => t('if set to generic, relation_name has to be one of the mappings'),
+          '#default_value' => "generic",
+      );
+
+
+
+
+
     $form['author'] = array(
         '#type' => 'textfield',
         '#title' => t('Author'),
@@ -359,8 +376,9 @@
     //$entity_type = $this->entityType();
     $entity_type = "relation";
     $bundle = $this->bundle();
-    drupal_alter('feeds_processor_targets', $targets, $entity_type, $bundle);
 
+    #drupal_alter('feeds_processor_targets', $targets, $entity_type, $bundle);
+    relation_feeds_processor_targets_alter($targets, $entity_type, $bundle);
     return $targets;
   }