public function FeedsXPathParserBase::getMappingSources in Feeds XPath Parser 7
Same name and namespace in other branches
- 6 FeedsXPathParserBase.inc \FeedsXPathParserBase::getMappingSources()
Overrides parent::getMappingSources().
File
- ./
FeedsXPathParserBase.inc, line 468 - Provides the base class for FeedsXPathParserHTML and FeedsXPathParserXML.
Class
- FeedsXPathParserBase
- Base class for the HTML and XML parsers.
Code
public function getMappingSources() {
$mappings = $this
->getOwnMappings();
$next = 0;
if (!empty($mappings)) {
// Mappings can be re-ordered, so find the max.
foreach (array_keys($mappings) as $key) {
list(, $index) = explode(':', $key);
if ($index > $next) {
$next = $index;
}
}
$next++;
}
return array(
'xpathparser:' . $next => array(
'name' => t('XPath Expression'),
'description' => t('Allows you to configure an XPath expression that will populate this field.'),
),
) + parent::getMappingSources();
}