You are here

public function GridStack::getIconUrl in GridStack 8

Same name and namespace in other branches
  1. 8.2 src/Entity/GridStack.php \Drupal\gridstack\Entity\GridStack::getIconUrl()

Returns the icon URL.

File

src/Entity/GridStack.php, line 384

Class

GridStack
Defines the GridStack configuration entity.

Namespace

Drupal\gridstack\Entity

Code

public function getIconUrl($absolute = FALSE) {
  $url = '';
  if ($uri = $this
    ->getIconUri()) {
    $url = file_url_transform_relative(file_create_url($uri));
    if (!$absolute) {
      $url = ltrim($url, '/');
    }
  }
  return $url;
}