mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 23:04:51 +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 */
|
/** @var string */
|
||||||
protected $path;
|
protected $path;
|
||||||
|
|
||||||
|
/** @var string */
|
||||||
|
protected $jsAssetPath;
|
||||||
|
|
||||||
|
/** @var string */
|
||||||
|
protected $cssAssetPath;
|
||||||
|
|
||||||
|
/** @var string */
|
||||||
|
protected $staticAssetPath;
|
||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $version;
|
protected $version;
|
||||||
|
|
||||||
@ -43,6 +52,39 @@ class Library
|
|||||||
return $this->path;
|
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
|
* Get this library's name
|
||||||
*
|
*
|
||||||
@ -158,6 +200,8 @@ class Library
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->{$type . 'AssetPath'} = $dir;
|
||||||
|
|
||||||
return new RecursiveIteratorIterator(new RecursiveDirectoryIterator(
|
return new RecursiveIteratorIterator(new RecursiveDirectoryIterator(
|
||||||
$dir,
|
$dir,
|
||||||
RecursiveDirectoryIterator::CURRENT_AS_PATHNAME | RecursiveDirectoryIterator::SKIP_DOTS
|
RecursiveDirectoryIterator::CURRENT_AS_PATHNAME | RecursiveDirectoryIterator::SKIP_DOTS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user