Révision ed9a13f1
Ajouté par Assos Assos il y a plus de 3 ans
drupal7/sites/all/modules/feeds/tests/feeds_tests.feeds.inc | ||
---|---|---|
5 | 5 |
* Feeds hooks implementations. |
6 | 6 |
*/ |
7 | 7 |
|
8 |
/** |
|
9 |
* Implements hook_feeds_prevalidate(). |
|
10 |
* |
|
11 |
* @see FeedsHooksTestCase::testPrevalidateHook() |
|
12 |
*/ |
|
13 |
function feeds_tests_feeds_prevalidate(FeedsSource $source, $entity, $item, $entity_id) { |
|
14 |
if (!variable_get('feeds_tests_hook_feeds_prevalidate', FALSE)) { |
|
15 |
return; |
|
16 |
} |
|
17 |
|
|
18 |
// Keep track of results so far. |
|
19 |
$results = variable_get('feeds_tests_hook_feeds_prevalidate_results', array()); |
|
20 |
$results[] = array( |
|
21 |
'importer_id' => $source->importer->id, |
|
22 |
'title' => $entity->title, |
|
23 |
'item_guid' => $item['guid'], |
|
24 |
'entity_id' => $entity_id, |
|
25 |
); |
|
26 |
variable_set('feeds_tests_hook_feeds_prevalidate_results', $results); |
|
27 |
} |
|
28 |
|
|
8 | 29 |
/** |
9 | 30 |
* Implements hook_feeds_config_defaults(). |
10 | 31 |
* |
Formats disponibles : Unified diff
Weekly update of contrib modules