mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Remove File dependency from Module class
This commit is contained in:
parent
556c9a537e
commit
e08948480c
@ -4,7 +4,6 @@ namespace SilverStripe\Core\Manifest;
|
|||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use Serializable;
|
use Serializable;
|
||||||
use SilverStripe\Assets\File;
|
|
||||||
|
|
||||||
class Module implements Serializable
|
class Module implements Serializable
|
||||||
{
|
{
|
||||||
@ -163,7 +162,9 @@ class Module implements Serializable
|
|||||||
*/
|
*/
|
||||||
public function getResourcePath($path)
|
public function getResourcePath($path)
|
||||||
{
|
{
|
||||||
return File::join_paths($this->getRelativePath(), $path);
|
$base = rtrim($this->getRelativePath(), '/\\');
|
||||||
|
$path = rtrim($path, '/\\');
|
||||||
|
return "{$base}/{$path}";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user