function feeds_tests_feeds_processor_targets in Feeds 7.2
Implements hook_feeds_processor_targets().
File
- tests/
feeds_tests.module, line 370 - Helper module for Feeds tests.
Code
function feeds_tests_feeds_processor_targets($entity_type, $bundle) {
$targets = array();
// Tests that old keys still work.
$targets['test_target_compat'] = array(
'name' => t('Old style target'),
'callback' => 'feeds_tests_mapper_set_target',
'summary_callback' => 'feeds_tests_mapper_summary',
'form_callback' => 'feeds_tests_mapper_form',
);
$targets['test_target'] = array(
'name' => t('Test Target'),
'description' => t('This is a test target.'),
'callback' => 'feeds_tests_mapper_set_target',
'summary_callbacks' => array(
'feeds_tests_mapper_summary',
'feeds_tests_mapper_summary_2',
),
'form_callbacks' => array(
'feeds_tests_mapper_form',
'feeds_tests_mapper_form_2',
),
'preprocess_callbacks' => array(
array(
new FeedsTestsPreprocess(),
'callback',
),
),
);
$targets['test_unique_target'] = array(
'name' => t('Test unique target'),
'description' => t('This is a unique test target.'),
'callback' => 'feeds_tests_mapper_set_target',
'optional_unique' => TRUE,
'unique_callbacks' => array(
'feeds_tests_mapper_unique',
),
'preprocess_callbacks' => array(
array(
'FeedsTestsPreprocess',
'callback',
),
// Make sure that invalid callbacks are filtered.
'__feeds_tests_invalid_callback',
),
);
return $targets;
}