You are here

public function FeedType::addCustomSource in Feeds 8.3

Adds a custom source that can be used in mapping.

Parameters

string $name: The unique name for the source.

array $source: An array of the source properties:

  • label A human readable name.
  • value The value to extract from the feed.
  • description (optional) A description of the source.

Return value

$this An instance of this class.

Overrides FeedTypeInterface::addCustomSource

File

src/Entity/FeedType.php, line 376

Class

FeedType
Defines the Feeds feed type entity.

Namespace

Drupal\feeds\Entity

Code

public function addCustomSource($name, array $source) {
  $this->custom_sources[$name] = $source;
  return $this;
}