abstract class AbstractSkin implements ComponentInterface, Renderable

Xpressengine에서 스킨을 구현할 때 상속받아야 하는 클래스이다.

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
protected array $data
protected array|null $config
protected string $view

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)

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

__construct(array $config = null)

AbstractSkin constructor.

static string
getTitle()

get title of skin

static string
getDescription()

get description of skin

static string
getScreenshot()

get screenshot url of skin

$this
setData(mixed $data)

스킨을 출력할 때 필요한 데이터를 지정한다. 이 메소드는 chaining 방식으로 호출 가능하도록 $this를 반환한다.

$this
setView(string $view)

스킨을 출력할 때 필요한 view id를 지정한다. 이 스킨을 사용하는 곳에서는 스킨 출력시 어떤 view를 출력할지 지정해야 한다.

Renderable|string
render()

만약 view 이름과 동일한 메소드명이 존재하면 그 메소드를 호출한다.

string|Renderable
getSettingView(array $config = array())

No description

mixed
renderSetting(array $args = array())

스킨 설정을 위한 화면에 출력될 html 반환

array
updateSetting(array $config)

No description

array
resolveSetting(array $inputs = array())

스킨 설정 페이지에서 입력된 설정값이 저장되기 전 필요한 처리한다.

array|void
setting(array $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 57
__construct(array $config = null)

AbstractSkin constructor.

Parameters

array $config configuration data

at line 67
static string getTitle()

get title of skin

Return Value

string

at line 77
static string getDescription()

get description of skin

Return Value

string

at line 87
static string getScreenshot()

get screenshot url of skin

Return Value

string

at line 103
$this setData(mixed $data)

스킨을 출력할 때 필요한 데이터를 지정한다. 이 메소드는 chaining 방식으로 호출 가능하도록 $this를 반환한다.

Parameters

mixed $data 지정할 데이터

Return Value

$this

at line 117
$this setView(string $view)

스킨을 출력할 때 필요한 view id를 지정한다. 이 스킨을 사용하는 곳에서는 스킨 출력시 어떤 view를 출력할지 지정해야 한다.

이 메소드는 chaining 방식으로 호출 가능하도록 $this를 반환한다.

Parameters

string $view 스킨 출력(render)시 사용할 view 지정

Return Value

$this

at line 128
Renderable|string render()

만약 view 이름과 동일한 메소드명이 존재하면 그 메소드를 호출한다.

Return Value

Renderable|string

at line 144
string|Renderable getSettingView(array $config = array())

Parameters

array $config skin config

Return Value

string|Renderable

at line 156
mixed renderSetting(array $args = array())

스킨 설정을 위한 화면에 출력될 html 반환

Parameters

array $args 설정 데이터

Return Value

mixed

at line 169
array updateSetting(array $config)

Parameters

array $config 설정값

Return Value

array

at line 183
array resolveSetting(array $inputs = array())

스킨 설정 페이지에서 입력된 설정값이 저장되기 전 필요한 처리한다.

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

Parameters

array $inputs 설정값

Return Value

array

at line 195
array|void setting(array $config = null)

set or get config info

Parameters

array $config config data

Return Value

array|void