You are here

public function TweetEntity::getLinkedImageUrls in Tweet Feed 8.3

Same name and namespace in other branches
  1. 4.x src/Entity/TweetEntity.php \Drupal\tweet_feed\Entity\TweetEntity::getLinkedImageUrls()

File

src/Entity/TweetEntity.php, line 272

Class

TweetEntity
Defines the Tweet Feed Tweet entity.

Namespace

Drupal\tweet_feed\Entity

Code

public function getLinkedImageUrls() {
  $files = $this
    ->getLinkedImages();
  $urls = [];
  foreach ($files as $file) {
    $file_uri = $file
      ->getFileUri();

    // I can't believe this will survive Drupal 9 but there is no deprecation notice on it yet.
    $urls[] = file_create_url($file_uri);
  }
  return $urls;
}