You are here

protected function ParserBase::getOwnMappings in Feeds XPath Parser 8

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 ParserBase::getOwnMappings()
ParserBase::baseForm in lib/Drupal/feeds_xpathparser/ParserBase.php
ParserBase::getMappingSources in lib/Drupal/feeds_xpathparser/ParserBase.php
ParserBase::parse in lib/Drupal/feeds_xpathparser/ParserBase.php
ParserBase::validateForm in lib/Drupal/feeds_xpathparser/ParserBase.php
Form validation handler.

File

lib/Drupal/feeds_xpathparser/ParserBase.php, line 551
Contains \Drupal\feeds_xpathparser\ParserBase.

Class

ParserBase
Base class for the HTML and XML parsers.

Namespace

Drupal\feeds_xpathparser

Code

protected function getOwnMappings($label = FALSE) {
  $mappings = $this
    ->filterMappings($this->importer->processor
    ->getMappings());
  if ($label) {
    $targets = $this->importer->processor
      ->getMappingTargets();
    foreach ($mappings as $source => $target) {
      $mappings[$source] = $targets[$target]['name'];
    }
  }
  return $mappings;
}