ThemeHandler
class ThemeHandler
Properties
protected ThemeEntity[] | $themeList | ||
$configDelimiter | |||
protected | $cachePath | ||
protected string | $configKey | ||
protected ThemeEntity | $selectedTheme | ||
protected string | $selectedThemeId | ||
protected PluginRegister | $register | ||
protected ConfigManager | $config | ||
protected string | $blankTheme | ||
protected Closure | $mobileResolver | ||
protected Factory | $viewFactory |
Methods
생성자
get ViewFactory
set view cache path
retrieve view cache path
check whether has cache or not
현재 요청이 모바일 버전인지 조회할 때 사용되는 resolver를 조회한다.
현재 Request에서 사용될 테마를 지정한다. 이 메소드를 이용하여 테마를 지정하면, theme middleware에서 지정된 테마를 자동으로 출력한다.
사이트 기본테마를 사용할 테마로 지정한다.
아무 테마도 지정하지 않는다. 내부적으로는 blankTheme를 지정한다.
alias for selectBlankTheme()
현재 Request에서 사용되는 테마를 반환한다. 반환되는 테마는 일반 테마일 수도 있고, 관리페이지용 테마일수도 있다.
등록된 테마중 주어진 id를 가진 테마를 반환한다.
사이트 기본 테마를 지정한다. 사이트 기본 테마 정보는 데이터베이스에 저장 된다.
사이트 기본 테마를 조회한다.
모든 일반 테마 목록을 반환한다.
getAllThemeSupportingMobile
getAllThemeSupportingDesktop
모든 관리페이지 테마 목록을 반환한다.
주어진 테마가 저장된 config data를 가지고 있는지 검사한다.
주어진 테마에 저장된 config data를 반환한다.
주어진 테마의 config data를 저장한다.
주어진 테마의 config data를 삭제한다.
주어진 테마에 저장된 모든 config data를 반환한다.
config id for given theme
make and return ThemeEntity
Details
at line 91
__construct(PluginRegister $register, ConfigManager $config, Factory $viewFactory, string $blankTheme)
생성자
at line 104
Factory
getViewFactory()
get ViewFactory
at line 116
void
setMobileResolver(Closure $callback)
현재 요청이 모바일 버전인지 조회할 때 사용되는 resolver를 지정한다.
at line 128
void
setCachePath(string $path)
set view cache path
at line 140
string
getCachePath(string $path)
retrieve view cache path
at line 153
bool
hasCache(string $path)
check whether has cache or not
at line 164
Closure
getMobileResolver()
현재 요청이 모바일 버전인지 조회할 때 사용되는 resolver를 조회한다.
at line 177
void
selectTheme(string $id)
현재 Request에서 사용될 테마를 지정한다. 이 메소드를 이용하여 테마를 지정하면, theme middleware에서 지정된 테마를 자동으로 출력한다.
at line 192
void
selectSiteTheme(null $mode = null)
사이트 기본테마를 사용할 테마로 지정한다.
mode가 지정되지 않았을 경우 mobile resolver로부터 mode를 구한다. mode가 지정돼 있을 경우 해당 mode의 테마를 지정한다.
at line 206
void
selectBlankTheme()
아무 테마도 지정하지 않는다. 내부적으로는 blankTheme를 지정한다.
at line 216
void
deselectTheme()
alias for selectBlankTheme()
at line 226
ThemeEntity
getSelectedTheme()
현재 Request에서 사용되는 테마를 반환한다. 반환되는 테마는 일반 테마일 수도 있고, 관리페이지용 테마일수도 있다.
at line 245
ThemeEntity
getTheme(string $instanceId)
등록된 테마중 주어진 id를 가진 테마를 반환한다.
at line 275
void
setSiteTheme(string $id, null|string $mode = null)
사이트 기본 테마를 지정한다. 사이트 기본 테마 정보는 데이터베이스에 저장 된다.
at line 296
mixed
getSiteThemeId(null|string $mode = null)
사이트 기본 테마를 조회한다.
at line 316
array
getAllTheme()
모든 일반 테마 목록을 반환한다.
at line 332
array
getAllThemeSupportingMobile()
getAllThemeSupportingMobile
at line 349
array
getAllThemeSupportingDesktop()
getAllThemeSupportingDesktop
at line 366
array
getAllSettingsTheme()
모든 관리페이지 테마 목록을 반환한다.
at line 382
bool
hasThemeConfig(string $id)
주어진 테마가 저장된 config data를 가지고 있는지 검사한다.
at line 396
ConfigEntity
getThemeConfig(string $id, bool $create = false)
주어진 테마에 저장된 config data를 반환한다.
at line 421
void
setThemeConfig(string $id, string|array $key, mixed $configData = null)
주어진 테마의 config data를 저장한다.
at line 446
void
deleteThemeConfig(string $id)
주어진 테마의 config data를 삭제한다.
at line 459
array
getThemeConfigList(string $id)
주어진 테마에 저장된 모든 config data를 반환한다.
at line 483
string
getConfigId(string $id)
config id for given theme
at line 496
protected ThemeEntity
makeEntity(string $id, string $class)
make and return ThemeEntity