You are here

protected function DemoSystem::preparePicture in Open Social 8

Prepares data about an image.

Parameters

string $picture: The picture by uuid.

Return value

array Returns an array.

2 calls to DemoSystem::preparePicture()
DemoSystem::createContent in modules/custom/social_demo/src/DemoSystem.php
Creates content.
DemoSystem::replaceAnBlock in modules/custom/social_demo/src/DemoSystem.php
Function to replace the AN homepage Block.

File

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

Class

DemoSystem
Class DemoSystem.

Namespace

Drupal\social_demo

Code

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