You are here

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

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

File

src/Entity/TweetEntity.php, line 247

Class

TweetEntity
Defines the Tweet Feed Tweet entity.

Namespace

Drupal\tweet_feed\Entity

Code

public function getLinkedImages() {
  $files = $this
    ->get('linked_images')
    ->getValue();
  $images = [];
  foreach ($files as $file) {
    $fo = File::load($file['target_id']);
    $images[] = $fo;
  }
  return $images;
}