abstract class AbstractTheme implements ComponentInterface, Renderable

이 클래스는 Xpressengine에서 테마를 구현할 때 필요한 추상클래스이다. 테마를 Xpressengine에 등록하려면 이 추상 클래스를 상속(extends) 받는 클래스를 작성하여야 한다.

Traits

ComponentInterface를 구현한 Trait
Theme나 skin과 같이 html을 출력하는 컴포넌트에서 사용할 수 있는 Trait으로서, 컴포넌트가 mobile 버전, desktop 버전을 지원하는지에 대한 정보를 제공한다.

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
static protected ThemeHandler $handler
protected ConfigEntity $config

Methods

static string
getId()

component의 id를 반환한다.

static void
setId(string $id)

component의 id를 지정한다.

static mixed
getComponentInfo(string $key = null)

information을 검색한다.

static void
setComponentInfo(string $key, mixed $value = null)

information을 추가하거나 수정한다.

static void
boot()

boot

static null|string
getSettingsURI()

return settings manage uri

static bool
supportDesktop()

desktop 버전 지원 여부를 조사한다.

static bool
supportMobile()

mobile 버전 지원 여부를 조사한다.

static bool
support(string $version)

지정된 버전을 지원하는지 조사한다.

static void
setHandler(ThemeHandler $handler)

테마 핸들러를 지정한다.

static string
getTitle()

테마의 이름을 반환한다.

static string
getDescription()

테마의 설명을 반환한다.

static mixed
getScreenshot()

테마의 스크린샷을 반환한다.

static bool
hasSetting()

이 테마가 설정페이지를 제공하는 테마인지 조회한다.

array
getEditFiles()

테마 편집 페이지에서 편집할 수 있는 파일의 목록을 반환한다.

string
getSettingView(ConfigEntity $config = null)

테마 설정 페이지에 출력할 html 텍스트를 출력한다.

string
renderSetting(ConfigEntity $config = null)

테마 설정 페이지에 출력할 html 텍스트를 출력한다.

array
resolveSetting(array $config)

테마 설정 페이지에서 입력된 설정값이 저장되기 전 필요한 작업을 처리한다.

void
deleteSetting(ConfigEntity $config)

생성된 테마 설정을 삭제하기 전 필요한 작업을 처리한다.

setting(ConfigEntity $config = null)

set or get config info

Details

in ComponentTrait at line 51
static string getId()

component의 id를 반환한다.

Return Value

string

in ComponentTrait at line 67
static void setId(string $id)

component의 id를 지정한다.

Parameters

string $id 지정할 id

Return Value

void

in ComponentTrait at line 83
static mixed getComponentInfo(string $key = null)

information을 검색한다.

Parameters

string $key 검색할 information의 키

Return Value

mixed 검색된 information를 반환함.

in ComponentTrait at line 99
static void setComponentInfo(string $key, mixed $value = null)

information을 추가하거나 수정한다.

Parameters

string $key 추가하거나 수정할 information의 key
mixed $value 추가하거나 수정할 information의 value

Return Value

void

in ComponentTrait at line 119
static void boot()

boot

Return Value

void

in ComponentTrait at line 129
static null|string getSettingsURI()

return settings manage uri

Return Value

null|string

in MobileSupportTrait at line 42
static bool supportDesktop()

desktop 버전 지원 여부를 조사한다.

Return Value

bool

in MobileSupportTrait at line 52
static bool supportMobile()

mobile 버전 지원 여부를 조사한다.

Return Value

bool

in MobileSupportTrait at line 64
static bool support(string $version)

지정된 버전을 지원하는지 조사한다.

Parameters

string $version version

Return Value

bool

at line 56
static void setHandler(ThemeHandler $handler)

테마 핸들러를 지정한다.

Parameters

ThemeHandler $handler 테마 핸들러

Return Value

void

at line 66
static string getTitle()

테마의 이름을 반환한다.

Return Value

string

at line 76
static string getDescription()

테마의 설명을 반환한다.

Return Value

string

at line 86
static mixed getScreenshot()

테마의 스크린샷을 반환한다.

Return Value

mixed

at line 99
static bool hasSetting()

이 테마가 설정페이지를 제공하는 테마인지 조회한다.

Return Value

bool

at line 109
array getEditFiles()

테마 편집 페이지에서 편집할 수 있는 파일의 목록을 반환한다.

Return Value

array

at line 124
string getSettingView(ConfigEntity $config = null)

테마 설정 페이지에 출력할 html 텍스트를 출력한다.

설정폼은 자동으로 생성되며 설정폼 내부에 출력할 html만 반환하면 된다.

Parameters

ConfigEntity $config 기존에 설정된 설정값

Return Value

string

at line 137
string renderSetting(ConfigEntity $config = null)

테마 설정 페이지에 출력할 html 텍스트를 출력한다.

설정폼은 자동으로 생성되며 설정폼 내부에 출력할 html만 반환하면 된다.

Parameters

ConfigEntity $config 기존에 설정된 설정값

Return Value

string

at line 151
array resolveSetting(array $config)

테마 설정 페이지에서 입력된 설정값이 저장되기 전 필요한 작업을 처리한다.

사이트관리자가 테마 설정 페이지에서 저장 요청을 할 경우, 테마핸들러가 설정값을 저장하기 전에 이 메소드가 실행된다. 설정값을 보완할 필요가 있을 경우 이 메소드에서 보완하여 다시 반환하면 된다.

Parameters

array $config pure config data

Return Value

array

at line 164
void deleteSetting(ConfigEntity $config)

생성된 테마 설정을 삭제하기 전 필요한 작업을 처리한다.

사이트 관리자가 테마 설정 페이지에서 삭제 요청을 할 경우, 테마핸들러가 설정값을 삭제하기 전에 이 메소드가 실행된다.

Parameters

ConfigEntity $config 삭제될 설정 정보

Return Value

void

at line 176
ConfigEntity|void setting(ConfigEntity $config = null)

set or get config info

Parameters

ConfigEntity $config config data

Return Value

ConfigEntity|void