You are here

function my_module_summary_callback in Feeds 8.2

Example of the summary_callback specified in hook_feeds_processor_targets_alter().

Parameters

$mapping: Associative array of the mapping settings.

$target: Array of target settings, as defined by the processor or hook_feeds_processor_targets_alter().

$form: The whole mapping form.

$form_state: The form state of the mapping form.

Return value

Returns, as a string that may contain HTML, the summary to display while the full form isn't visible. If the return value is empty, no summary and no option to view the form will be displayed.

Related topics

1 string reference to 'my_module_summary_callback'
hook_feeds_processor_targets_alter in ./feeds.api.php
Alter mapping targets for entities. Use this hook to add additional target options to the mapping form of Node processors.

File

./feeds.api.php, line 334
Documentation of Feeds hooks.

Code

function my_module_summary_callback($mapping, $target, $form, $form_state) {
  if (empty($mapping['my_setting'])) {
    return t('My setting <strong>not</strong> active');
  }
  else {
    return t('My setting <strong>active</strong>');
  }
}