You are here

public function TweetEntity::getLinkedImageUrls in Tweet Feed 4.x

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

File

src/Entity/TweetEntity.php, line 268

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;
}