You are here

public function LinkExtractorService::saveLinkMultiple in Link checker 8

Helper function to save links.

Saves link if it not a duplicate.

@todo should we move this method to entity storage?

Parameters

\Drupal\linkchecker\LinkCheckerLinkInterface[] $links: Array of links to save.

File

src/LinkExtractorService.php, line 331

Class

LinkExtractorService
Class LinkExtractor.

Namespace

Drupal\linkchecker

Code

public function saveLinkMultiple(array $links) {
  foreach ($links as $link) {
    $this
      ->saveLink($link);
  }
}