You are here

public static function SvgSpriteGenerator::getSpriteDestinationPath in Icon Select 8

Gets the path where the sprite-sheet should be stored at.

Return value

string Relative path to the sprite-sheet.

2 calls to SvgSpriteGenerator::getSpriteDestinationPath()
icon_select_preprocess_page in ./icon_select.module
Implements hook_preprocess_page().
SvgSpriteGenerator::generateSprites in src/Helper/SvgSpriteGenerator.php
Generate an svg sprite-sheet from a vocabulary.

File

src/Helper/SvgSpriteGenerator.php, line 115

Class

SvgSpriteGenerator
Helper class to generate SVG image maps.

Namespace

Drupal\icon_select\Helper

Code

public static function getSpriteDestinationPath() {
  $config = \Drupal::service('config.factory')
    ->getEditable('icon_select.settings');
  $path = !empty($config
    ->get('path')) ? $config
    ->get('path') : 'icons/icon_select_map.svg';
  $destination = "public://" . $path;
  return $destination;
}