You are here

LinkLinkExtractor.php in Link checker 8

File

src/Plugin/LinkExtractor/LinkLinkExtractor.php
View source
<?php

namespace Drupal\linkchecker\Plugin\LinkExtractor;

use Drupal\linkchecker\Plugin\LinkExtractorBase;

/**
 * Class LinkLinkExtractor.
 *
 * @LinkExtractor(
 *   id = "link_link_extractor",
 *   label = @Translation("Link extractor"),
 *   field_types = {
 *     "link"
 *   }
 * )
 */
class LinkLinkExtractor extends LinkExtractorBase {

  /**
   * {@inheritdoc}
   */
  protected function extractUrlFromField(array $value) {

    // Return the uri index from the $value array.
    return empty($value['uri']) ? [] : [
      $value['uri'],
    ];
  }

}

Classes

Namesort descending Description
LinkLinkExtractor Class LinkLinkExtractor.