You are here

public function ParagraphsSet::getIconFile in Paragraphs Sets 8.2

Returns the icon file entity.

Return value

\Drupal\file\FileInterface|bool The icon's file entity or FALSE if icon does not exist.

Overrides ParagraphsSetInterface::getIconFile

2 calls to ParagraphsSet::getIconFile()
ParagraphsSet::calculateDependencies in src/Entity/ParagraphsSet.php
Calculates dependencies and stores them in the dependency property.
ParagraphsSet::getIconUrl in src/Entity/ParagraphsSet.php
Returns the icon's URL.

File

src/Entity/ParagraphsSet.php, line 83

Class

ParagraphsSet
Defines the ParagraphsSet entity.

Namespace

Drupal\paragraphs_sets\Entity

Code

public function getIconFile() {
  if ($this->icon_uuid && ($icon = $this
    ->getFileByUuid($this->icon_uuid))) {
    return $icon;
  }
  return FALSE;
}