protected function FeedsXPathParserBase::getOwnMappings in Feeds XPath Parser 7
Same name and namespace in other branches
- 6 FeedsXPathParserBase.inc \FeedsXPathParserBase::getOwnMappings()
Gets the mappings that are defined by this parser.
The mappings begin with "xpathparser:".
Return value
array An array of mappings keyed source => target.
4 calls to FeedsXPathParserBase::getOwnMappings()
- FeedsXPathParserBase::configFormValidate in ./
FeedsXPathParserBase.inc - Overrides parent::sourceFormValidate().
- FeedsXPathParserBase::getMappingSources in ./
FeedsXPathParserBase.inc - Overrides parent::getMappingSources().
- FeedsXPathParserBase::parse in ./
FeedsXPathParserBase.inc - Implements FeedsParser::parse().
- FeedsXPathParserBase::sourceForm in ./
FeedsXPathParserBase.inc - Overrides parent::sourceForm().
File
- ./
FeedsXPathParserBase.inc, line 517 - Provides the base class for FeedsXPathParserHTML and FeedsXPathParserXML.
Class
- FeedsXPathParserBase
- Base class for the HTML and XML parsers.
Code
protected function getOwnMappings($label = FALSE) {
$importer = feeds_importer($this->id);
$mappings = $this
->filterMappings($importer->processor
->getMappings());
if ($label) {
$targets = $importer->processor
->getMappingTargets();
foreach ($mappings as $source => $target) {
$mappings[$source] = isset($targets[$target]['name']) ? $targets[$target]['name'] : $target;
}
}
return $mappings;
}