You are here

public function LinkExtractorBase::extract in Link checker 8

Extracts links from field list.

Parameters

array $value: The field value.

Return value

array List of URLs.

Overrides LinkExtractorInterface::extract

File

src/Plugin/LinkExtractorBase.php, line 53

Class

LinkExtractorBase
Base class for Link extractor plugins.

Namespace

Drupal\linkchecker\Plugin

Code

public function extract(array $value) {
  $urls = [];
  foreach ($value as $item) {
    $urls = array_merge($urls, $this
      ->extractUrlFromField($item));
  }
  return $urls;
}