You are here

public function SiteSource::getSourceElement in Feeds 8.3

Returns the value for a source.

Parameters

\Drupal\feeds\FeedInterface $feed: The feed being processed.

\Drupal\feeds\Feeds\Item\ItemInterface $item: The item that is processed.

Return value

array A list of scalar field values.

Overrides SourceInterface::getSourceElement

File

tests/modules/feeds_test_extra_sources/src/Feeds/Source/SiteSource.php, line 40

Class

SiteSource
A source exposing site config.

Namespace

Drupal\feeds_test_extra_sources\Feeds\Source

Code

public function getSourceElement(FeedInterface $feed, ItemInterface $item) {
  list(, $field_name) = explode(':', $this->configuration['source']);
  return \Drupal::config('system.site')
    ->get($field_name);
}