You are here

protected function DemoSystem::fetchImage in Open Social 8.6

Same name and namespace in other branches
  1. 8.9 modules/custom/social_demo/src/DemoSystem.php \Drupal\social_demo\DemoSystem::fetchImage()
  2. 8.2 modules/custom/social_demo/src/DemoSystem.php \Drupal\social_demo\DemoSystem::fetchImage()
  3. 8.3 modules/custom/social_demo/src/DemoSystem.php \Drupal\social_demo\DemoSystem::fetchImage()
  4. 8.4 modules/custom/social_demo/src/DemoSystem.php \Drupal\social_demo\DemoSystem::fetchImage()
  5. 8.5 modules/custom/social_demo/src/DemoSystem.php \Drupal\social_demo\DemoSystem::fetchImage()
  6. 8.7 modules/custom/social_demo/src/DemoSystem.php \Drupal\social_demo\DemoSystem::fetchImage()
  7. 8.8 modules/custom/social_demo/src/DemoSystem.php \Drupal\social_demo\DemoSystem::fetchImage()
  8. 10.3.x modules/custom/social_demo/src/DemoSystem.php \Drupal\social_demo\DemoSystem::fetchImage()
  9. 10.0.x modules/custom/social_demo/src/DemoSystem.php \Drupal\social_demo\DemoSystem::fetchImage()
  10. 10.1.x modules/custom/social_demo/src/DemoSystem.php \Drupal\social_demo\DemoSystem::fetchImage()
  11. 10.2.x modules/custom/social_demo/src/DemoSystem.php \Drupal\social_demo\DemoSystem::fetchImage()

Prepares data about an image.

Parameters

string $image: The image by uuid.

Return value

array Returns an array.

1 call to DemoSystem::fetchImage()
DemoSystem::createContent in modules/custom/social_demo/src/DemoSystem.php
Creates content.

File

modules/custom/social_demo/src/DemoSystem.php, line 245

Class

DemoSystem
Class DemoSystem.

Namespace

Drupal\social_demo

Code

protected function fetchImage($image) {
  $value = NULL;
  $files = $this->fileStorage
    ->loadByProperties([
    'uuid' => $image,
  ]);
  if ($files) {
    return current($files);
  }
  return $value;
}