public function ParagraphsType::getIconUrl

Returns the icon's URL.

Return value

string|false The icon's URL or FALSE if icon does not exits.

Overrides ParagraphsTypeInterface::getIconUrl

File

paragraphs/src/Entity/ParagraphsType.php, line 186

Class

ParagraphsType
Defines the ParagraphsType entity.

Namespace

Drupal\paragraphs\Entity

Code

public function getIconUrl() {
  if ($image = $this
    ->getIconFile()) {
    return \Drupal::service('file_url_generator')
      ->generateString($image
      ->getFileUri());
  }
  return FALSE;
}