mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
Library: Add getters for the different asset paths
This commit is contained in:
parent
ad9099509d
commit
c49a811fb5
@ -14,6 +14,15 @@ class Library
|
||||
/** @var string */
|
||||
protected $path;
|
||||
|
||||
/** @var string */
|
||||
protected $jsAssetPath;
|
||||
|
||||
/** @var string */
|
||||
protected $cssAssetPath;
|
||||
|
||||
/** @var string */
|
||||
protected $staticAssetPath;
|
||||
|
||||
/** @var string */
|
||||
protected $version;
|
||||
|
||||
@ -43,6 +52,39 @@ class Library
|
||||
return $this->path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get path of this library's JS assets
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getJsAssetPath()
|
||||
{
|
||||
$this->assets();
|
||||
return $this->jsAssetPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get path of this library's CSS assets
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCssAssetPath()
|
||||
{
|
||||
$this->assets();
|
||||
return $this->cssAssetPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get path of this library's static assets
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getStaticAssetPath()
|
||||
{
|
||||
$this->assets();
|
||||
return $this->staticAssetPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get this library's name
|
||||
*
|
||||
@ -158,6 +200,8 @@ class Library
|
||||
return [];
|
||||
}
|
||||
|
||||
$this->{$type . 'AssetPath'} = $dir;
|
||||
|
||||
return new RecursiveIteratorIterator(new RecursiveDirectoryIterator(
|
||||
$dir,
|
||||
RecursiveDirectoryIterator::CURRENT_AS_PATHNAME | RecursiveDirectoryIterator::SKIP_DOTS
|
||||
|
Loading…
x
Reference in New Issue
Block a user