You are here

protected function FeedsItemUrlFormatter::buildUrl in Feeds 8.3

Builds the \Drupal\Core\Url object for a feeds_item field item.

Parameters

\Drupal\feeds\FeedsItemInterface $item: The feeds_item field item being rendered.

Return value

\Drupal\Core\Url An Url object.

1 call to FeedsItemUrlFormatter::buildUrl()
FeedsItemUrlFormatter::viewElements in src/Plugin/Field/FieldFormatter/FeedsItemUrlFormatter.php
Builds a renderable array for a field value.

File

src/Plugin/Field/FieldFormatter/FeedsItemUrlFormatter.php, line 95

Class

FeedsItemUrlFormatter
Plugin implementation of the 'feeds_item_url' formatter.

Namespace

Drupal\feeds\Plugin\Field\FieldFormatter

Code

protected function buildUrl(FeedsItemInterface $item) {
  return $item
    ->getUrl() ?: Url::fromRoute('<none>');
}