2014-05-14 13:24:20 +00:00
|
|
|
<?php namespace Backend\Skins;
|
|
|
|
|
|
2014-09-20 01:25:57 +00:00
|
|
|
use File;
|
2014-05-14 13:24:20 +00:00
|
|
|
use Backend\Classes\Skin;
|
2014-09-20 01:25:57 +00:00
|
|
|
use October\Rain\Router\Helper as RouterHelper;
|
2014-05-14 13:24:20 +00:00
|
|
|
|
|
|
|
|
/**
|
2014-09-20 01:25:57 +00:00
|
|
|
* Standard skin information file.
|
|
|
|
|
*
|
|
|
|
|
* This skin uses the default paths always, there is no lookup required.
|
2014-05-14 13:24:20 +00:00
|
|
|
*
|
|
|
|
|
* @package october\backend
|
|
|
|
|
* @author Alexey Bobkov, Samuel Georges
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
class Standard extends Skin
|
|
|
|
|
{
|
|
|
|
|
|
2014-09-20 01:25:57 +00:00
|
|
|
/**
|
2017-03-15 19:26:14 +00:00
|
|
|
* @inheritDoc
|
2014-09-20 01:25:57 +00:00
|
|
|
*/
|
|
|
|
|
public function __construct()
|
|
|
|
|
{
|
2015-02-07 04:42:20 +00:00
|
|
|
$this->skinPath = $this->defaultSkinPath = base_path() . '/modules/backend';
|
2014-09-20 01:25:57 +00:00
|
|
|
$this->publicSkinPath = $this->defaultPublicSkinPath = File::localToPublic($this->skinPath);
|
|
|
|
|
}
|
|
|
|
|
|
2014-05-14 13:24:20 +00:00
|
|
|
/**
|
2017-03-15 19:26:14 +00:00
|
|
|
* @inheritDoc
|
2014-05-14 13:24:20 +00:00
|
|
|
*/
|
|
|
|
|
public function skinDetails()
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
'name' => 'Default Skin'
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
2014-09-20 01:25:57 +00:00
|
|
|
/**
|
2017-03-15 19:26:14 +00:00
|
|
|
* @inheritDoc
|
2014-09-20 01:25:57 +00:00
|
|
|
*/
|
|
|
|
|
public function getPath($path = null, $isPublic = false)
|
|
|
|
|
{
|
|
|
|
|
$path = RouterHelper::normalizeUrl($path);
|
|
|
|
|
|
|
|
|
|
return $isPublic
|
|
|
|
|
? $this->defaultPublicSkinPath . $path
|
|
|
|
|
: $this->defaultSkinPath . $path;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2017-03-15 19:26:14 +00:00
|
|
|
* @inheritDoc
|
2014-09-20 01:25:57 +00:00
|
|
|
*/
|
|
|
|
|
public function getLayoutPaths()
|
|
|
|
|
{
|
|
|
|
|
return [$this->skinPath.'/layouts'];
|
|
|
|
|
}
|
2014-10-10 22:05:35 +00:00
|
|
|
}
|