GenericSkin
abstract class GenericSkin extends AbstractSkin
편의를 위해 AbstractSkin을 확장한 클래스. 특정 디렉토리에 지정된 형식에 맞게 테마에 필요한 파일들을 구성한 후, 이 클래스의 $path에 디렉토리의 경로를 지정하여 사용한다.
Traits
Properties
static private array | $id | Component id, 만약 이 trait을 사용한 클래스를 상속한 클래스가 id를 지정하지 않았다면, 그 클래스의 id는 이 trait에서 가지고 있는 id에 저장된다. | from ComponentTrait |
static private array | $componentInfo | Component Informations, 만약 이 trait을 사용한 클래스를 상속한 클래스가 componentInfo를 지정하지 않았다면, 그 클래스의 infomation은 이 trait에서 가지고 있는 componentInfo에 저장된다. | from ComponentTrait |
static protected bool | $supportDesktop | from MobileSupportTrait | |
static protected bool | $supportMobile | from MobileSupportTrait | |
protected array | $data | from AbstractSkin | |
protected array|null | $config | from AbstractSkin | |
protected string | $view | from AbstractSkin | |
static protected string | $path | ||
static protected string | $viewDir | ||
static protected array | $info |
Methods
information을 추가하거나 수정한다.
desktop 버전 지원 여부를 조사한다.
mobile 버전 지원 여부를 조사한다.
스킨을 출력할 때 필요한 데이터를 지정한다. 이 메소드는 chaining 방식으로 호출 가능하도록 $this를 반환한다.
스킨을 출력할 때 필요한 view id를 지정한다. 이 스킨을 사용하는 곳에서는 스킨 출력시 어떤 view를 출력할지 지정해야 한다.
만약 view 이름과 동일한 메소드명이 존재하면 그 메소드를 호출한다.
스킨 설정을 위한 화면에 출력될 html 반환
스킨 설정 페이지에서 입력된 설정값이 저장되기 전 필요한 처리한다.
get path, example: 'plugins/myplugin/skin'
retrieve theme info from info.php file
블레이드 템플릿을 사용하여 스킨을 출력한다.
setting 과정에서 upload되는 파일을 저장한다.
setting 과정에서 upload되는 파일을 저장한다.
info.php에 등록돼 있는 setting 폼 리스트를 가져와 form을 생성하여 반환한다.
스킨의 asset 파일 주소(url)를 반환한다. 템플릿 파일 작성시 편의를 위해 사용한다.
view name을 반환한다. 템플릿 파일 작성시 편의를 위해 사용한다.
Details
in ComponentTrait at line 51
static string
getId()
component의 id를 반환한다.
in ComponentTrait at line 67
static void
setId(string $id)
component의 id를 지정한다.
in ComponentTrait at line 83
static mixed
getComponentInfo(string $key = null)
information을 검색한다.
in ComponentTrait at line 99
static void
setComponentInfo(string $key, mixed $value = null)
information을 추가하거나 수정한다.
in ComponentTrait at line 119
static void
boot()
boot
in ComponentTrait at line 129
static null|string
getSettingsURI()
return settings manage uri
at line 54
static bool
supportDesktop()
desktop 버전 지원 여부를 조사한다.
at line 64
static bool
supportMobile()
mobile 버전 지원 여부를 조사한다.
in MobileSupportTrait at line 64
static bool
support(string $version)
지정된 버전을 지원하는지 조사한다.
in AbstractSkin at line 57
__construct(array $config = null)
AbstractSkin constructor.
in AbstractSkin at line 67
static string
getTitle()
get title of skin
in AbstractSkin at line 77
static string
getDescription()
get description of skin
in AbstractSkin at line 87
static string
getScreenshot()
get screenshot url of skin
in AbstractSkin at line 103
$this
setData(mixed $data)
스킨을 출력할 때 필요한 데이터를 지정한다. 이 메소드는 chaining 방식으로 호출 가능하도록 $this를 반환한다.
in AbstractSkin at line 117
$this
setView(string $view)
스킨을 출력할 때 필요한 view id를 지정한다. 이 스킨을 사용하는 곳에서는 스킨 출력시 어떤 view를 출력할지 지정해야 한다.
이 메소드는 chaining 방식으로 호출 가능하도록 $this를 반환한다.
at line 105
Renderable|string
render()
만약 view 이름과 동일한 메소드명이 존재하면 그 메소드를 호출한다.
in AbstractSkin at line 144
string|Renderable
getSettingView(array $config = array())
at line 154
mixed
renderSetting(array $config = array())
스킨 설정을 위한 화면에 출력될 html 반환
in AbstractSkin at line 169
array
updateSetting(array $config)
at line 180
array
resolveSetting(array $inputs = array())
스킨 설정 페이지에서 입력된 설정값이 저장되기 전 필요한 처리한다.
사이트관리자가 스킨 설정 페이지에서 저장 요청을 할 경우, 스킨핸들러가 설정값을 저장하기 전에 이 메소드가 실행된다. 설정값을 보완할 필요가 있을 경우 이 메소드에서 보완하여 다시 반환하면 된다.
in AbstractSkin at line 195
array|void
setting(array $config = null)
set or get config info
at line 74
static mixed
getPath()
get path, example: 'plugins/myplugin/skin'
at line 87
static array
info(string $key = null, mixed $default = null)
retrieve theme info from info.php file
at line 130
protected Factory|View|null
renderBlade(null|string $view = null)
블레이드 템플릿을 사용하여 스킨을 출력한다.
at line 207
protected array
saveFile(string $configId, string $key, UploadedFile $file)
setting 과정에서 upload되는 파일을 저장한다.
at line 248
protected array
removeFile(string $key)
setting 과정에서 upload되는 파일을 저장한다.
at line 270
protected string
makeConfigView(array $info, array $old)
info.php에 등록돼 있는 setting 폼 리스트를 가져와 form을 생성하여 반환한다.
at line 283
static string
asset(string $path, string $secure = null)
스킨의 asset 파일 주소(url)를 반환한다. 템플릿 파일 작성시 편의를 위해 사용한다.
at line 296
static string
view(string $view)
view name을 반환한다. 템플릿 파일 작성시 편의를 위해 사용한다.