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