Skip to content
Snippets Groups Projects
Commit a966aba4 authored by diamondsea's avatar diamondsea Committed by MegaChriz
Browse files

Issue #2367829 by MegaChriz, diamondsea: Added descriptions for options for...

Issue #2367829 by MegaChriz, diamondsea: Added descriptions for options for "Update existing" setting.
parent c468750b
No related branches found
No related tags found
No related merge requests found
...@@ -883,14 +883,15 @@ abstract class FeedsProcessor extends FeedsPlugin { ...@@ -883,14 +883,15 @@ abstract class FeedsProcessor extends FeedsPlugin {
$form['update_existing'] = array( $form['update_existing'] = array(
'#type' => 'radios', '#type' => 'radios',
'#title' => t('Update existing @entities', $tokens), '#title' => t('Update existing @entities', $tokens),
'#description' => '#description' => t('Existing @entities will be determined using mappings that are a "unique target".', $tokens),
t('Existing @entities will be determined using mappings that are a "unique target".', $tokens),
'#options' => array( '#options' => array(
FEEDS_SKIP_EXISTING => t('Do not update existing @entities', $tokens), FEEDS_SKIP_EXISTING => t('Do not update existing @entities', $tokens),
FEEDS_REPLACE_EXISTING => t('Replace existing @entities', $tokens), FEEDS_REPLACE_EXISTING => t('Replace existing @entities', $tokens),
FEEDS_UPDATE_EXISTING => t('Update existing @entities', $tokens), FEEDS_UPDATE_EXISTING => t('Update existing @entities', $tokens),
), ),
'#default_value' => $this->config['update_existing'], '#default_value' => $this->config['update_existing'],
'#after_build' => array('feeds_processor_config_form_update_existing_after_build'),
'#tokens' => $tokens,
); );
global $user; global $user;
$formats = filter_formats($user); $formats = filter_formats($user);
...@@ -1292,3 +1293,14 @@ abstract class FeedsProcessor extends FeedsPlugin { ...@@ -1292,3 +1293,14 @@ abstract class FeedsProcessor extends FeedsPlugin {
} }
class FeedsProcessorBundleNotDefined extends Exception {} class FeedsProcessorBundleNotDefined extends Exception {}
/**
* Form after build callback for the field "update_existing".
*
* Adds descriptions to options of this field.
*/
function feeds_processor_config_form_update_existing_after_build($field) {
$field[FEEDS_REPLACE_EXISTING]['#description'] = t('Loads records directly from the database, bypassing the Entity API. Faster, but use with caution.');
$field[FEEDS_UPDATE_EXISTING]['#description'] = t('Loads complete @entities using the Entity API for full integration with other modules. Slower, but most reliable.', $field['#tokens']);
return $field;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment