Révision 41cc1b08
Ajouté par Assos Assos il y a presque 9 ans
drupal7/sites/all/modules/feeds/mappers/profile.inc | ||
---|---|---|
2 | 2 |
|
3 | 3 |
/** |
4 | 4 |
* @file |
5 |
* On behalf implementation of Feeds mapping API for user profiles.
|
|
5 |
* On behalf implementation of Feeds mapping API for profile.module.
|
|
6 | 6 |
*/ |
7 | 7 |
|
8 | 8 |
/** |
9 |
* Implements hook_feeds_processor_target_alter().
|
|
9 |
* Implements hook_feeds_processor_targets().
|
|
10 | 10 |
*/ |
11 |
function profile_feeds_processor_targets_alter(&$targets, $entity_type, $bundle_name) { |
|
11 |
function profile_feeds_processor_targets($entity_type, $bundle_name) { |
|
12 |
$targets = array(); |
|
12 | 13 |
|
13 | 14 |
if ($entity_type != 'user') { |
14 |
return; |
|
15 |
return $targets;
|
|
15 | 16 |
} |
16 | 17 |
|
17 | 18 |
$categories = profile_user_categories(); |
... | ... | |
25 | 26 |
); |
26 | 27 |
} |
27 | 28 |
} |
29 |
|
|
30 |
return $targets; |
|
28 | 31 |
} |
29 | 32 |
|
30 | 33 |
/** |
31 | 34 |
* Set the user profile target after import. |
32 | 35 |
*/ |
33 |
function profile_feeds_set_target($source, $entity, $target, $value, $mapping) {
|
|
34 |
$entity->$target = $value;
|
|
36 |
function profile_feeds_set_target(FeedsSource $source, $entity, $target, array $values) {
|
|
37 |
$entity->$target = reset($values);
|
|
35 | 38 |
} |
Formats disponibles : Unified diff
Update feeds 7.x-2.0-alpha9 -> 7.x-2.0-beta1
Install lib simplepie 1.3.1