You are here

public function FeedType::getMappedSources in Feeds 8.3

Returns a list of mapped sources.

Return value

string[] A list of mapped source names.

Overrides FeedTypeInterface::getMappedSources

File

src/Entity/FeedType.php, line 357

Class

FeedType
Defines the Feeds feed type entity.

Namespace

Drupal\feeds\Entity

Code

public function getMappedSources() {
  $sources = [];
  foreach ($this
    ->getMappings() as $mapping) {
    foreach ($mapping['map'] as $column => $source) {
      if ($source === '') {

        // Skip empty sources.
        continue;
      }
      $sources[$source] = $source;
    }
  }
  return $sources;
}