public function FeedsProcessor::getMappingTargets in Feeds 8.2
Declare possible mapping targets that this processor exposes.
Return value
An array of mapping targets. Keys are paths to targets separated by ->, values are TRUE if target can be unique, FALSE otherwise.
Related topics
4 calls to FeedsProcessor::getMappingTargets()
- FeedsNodeProcessor::getMappingTargets in lib/
Drupal/ feeds/ Plugin/ feeds/ processor/ FeedsNodeProcessor.php - Return available mapping targets.
- FeedsProcessor::map in lib/
Drupal/ feeds/ Plugin/ FeedsProcessor.php - Execute mapping on an item.
- FeedsTermProcessor::getMappingTargets in lib/
Drupal/ feeds/ Plugin/ feeds/ processor/ FeedsTermProcessor.php - Return available mapping targets.
- FeedsUserProcessor::getMappingTargets in lib/
Drupal/ feeds/ Plugin/ feeds/ processor/ FeedsUserProcessor.php - Return available mapping targets.
3 methods override FeedsProcessor::getMappingTargets()
- FeedsNodeProcessor::getMappingTargets in lib/
Drupal/ feeds/ Plugin/ feeds/ processor/ FeedsNodeProcessor.php - Return available mapping targets.
- FeedsTermProcessor::getMappingTargets in lib/
Drupal/ feeds/ Plugin/ feeds/ processor/ FeedsTermProcessor.php - Return available mapping targets.
- FeedsUserProcessor::getMappingTargets in lib/
Drupal/ feeds/ Plugin/ feeds/ processor/ FeedsUserProcessor.php - Return available mapping targets.
File
- lib/
Drupal/ feeds/ Plugin/ FeedsProcessor.php, line 688 - Contains FeedsProcessor and related classes.
Class
- FeedsProcessor
- Abstract class, defines interface for processors.
Namespace
Drupal\feeds\PluginCode
public function getMappingTargets() {
// The bundle has not been selected.
if (!$this
->bundle()) {
$info = $this
->entityInfo();
$bundle_name = !empty($info['bundle_name']) ? drupal_strtolower($info['bundle_name']) : t('bundle');
$plugin_key = feeds_importer($this->id)->config['processor']['plugin_key'];
$url = url('admin/structure/feeds/' . $this->id . '/settings/' . $plugin_key);
drupal_set_message(t('Please <a href="@url">select a @bundle_name</a>.', array(
'@url' => $url,
'@bundle_name' => $bundle_name,
)), 'warning', FALSE);
}
return array(
'url' => array(
'name' => t('URL'),
'description' => t('The external URL of the item. E. g. the feed item URL in the case of a syndication feed. May be unique.'),
'optional_unique' => TRUE,
),
'guid' => array(
'name' => t('GUID'),
'description' => t('The globally unique identifier of the item. E. g. the feed item GUID in the case of a syndication feed. May be unique.'),
'optional_unique' => TRUE,
),
);
}