PHP Class Xpressengine\Skin\GenericSkin

Author: XE Developers ([email protected])
Inheritance: extends AbstractSkin
Show file Open project: xpressengine/xpressengine Class Usage Examples

Protected Properties

Property Type Description
$info array
$path 스킨 디렉토리 경로
$viewDir 템플릿 파일 보관 디렉토리 경로

Public Methods

Method Description
asset ( string $path, string $secure = null ) : string 스킨의 asset 파일 주소(url)를 반환한다. 템플릿 파일 작성시 편의를 위해 사용한다.
getPath ( ) : mixed get path, example: 'plugins/myplugin/skin'
info ( string $key = null, mixed $default = null ) : array retrieve theme info from info.php file
render ( ) : Illuminate\Contracts\Support\Renderable | string 스킨을 출력한다.
renderSetting ( array $config = [] ) : mixed 스킨 설정을 위한 화면에 출력될 html 반환
resolveSetting ( array $inputs = [] ) : array 스킨 설정 페이지에서 입력된 설정값이 저장되기 전 필요한 처리한다.
supportDesktop ( ) : boolean desktop 버전 지원 여부를 조사한다.
supportMobile ( ) : boolean mobile 버전 지원 여부를 조사한다.
view ( string $view ) : string view name을 반환한다. 템플릿 파일 작성시 편의를 위해 사용한다.

Protected Methods

Method Description
makeConfigView ( array $info, array $old ) : string info.php에 등록돼 있는 setting 폼 리스트를 가져와 form을 생성하여 반환한다.
renderBlade ( null | string $view = null ) : Illuminate\Contracts\View\Factory | Illuminate\View\View | null 블레이드 템플릿을 사용하여 스킨을 출력한다.
saveFile ( string $configId, string $key, Symfony\Component\HttpFoundation\File\UploadedFile $file ) : array setting 과정에서 upload되는 파일을 저장한다.

Method Details

asset() public static method

스킨의 asset 파일 주소(url)를 반환한다. 템플릿 파일 작성시 편의를 위해 사용한다.
public static asset ( string $path, string $secure = null ) : string
$path string path가 주어질 경우 주어진 파일의 URL을 반환한다. path는 스킨의 assets 디렉토리 내에서의 상대 경로이어야 한다.
$secure string https 여부
return string

getPath() public static method

get path, example: 'plugins/myplugin/skin'
public static getPath ( ) : mixed
return mixed

info() public static method

retrieve theme info from info.php file
public static info ( string $key = null, mixed $default = null ) : array
$key string info field
$default mixed default value
return array

makeConfigView() protected method

info.php에 등록돼 있는 setting 폼 리스트를 가져와 form을 생성하여 반환한다.
protected makeConfigView ( array $info, array $old ) : string
$info array setting form info
$old array old config data
return string

render() public method

만약 view 이름과 동일한 메소드명이 존재하면 그 메소드를 호출한다.
public render ( ) : Illuminate\Contracts\Support\Renderable | string
return Illuminate\Contracts\Support\Renderable | string

renderBlade() protected method

블레이드 템플릿을 사용하여 스킨을 출력한다.
protected renderBlade ( null | string $view = null ) : Illuminate\Contracts\View\Factory | Illuminate\View\View | null
$view null | string view name
return Illuminate\Contracts\View\Factory | Illuminate\View\View | null

renderSetting() public method

스킨 설정을 위한 화면에 출력될 html 반환
public renderSetting ( array $config = [] ) : mixed
$config array 설정값
return mixed

resolveSetting() public method

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

saveFile() protected method

setting 과정에서 upload되는 파일을 저장한다.
protected saveFile ( string $configId, string $key, Symfony\Component\HttpFoundation\File\UploadedFile $file ) : array
$configId string config id
$key string config field key
$file Symfony\Component\HttpFoundation\File\UploadedFile file
return array

supportDesktop() public static method

desktop 버전 지원 여부를 조사한다.
public static supportDesktop ( ) : boolean
return boolean

supportMobile() public static method

mobile 버전 지원 여부를 조사한다.
public static supportMobile ( ) : boolean
return boolean

view() public static method

view name을 반환한다. 템플릿 파일 작성시 편의를 위해 사용한다.
public static view ( string $view ) : string
$view string view name
return string

Property Details

$info protected static property

protected static array $info
return array

$path protected static property

스킨 디렉토리 경로
protected static $path

$viewDir protected static property

템플릿 파일 보관 디렉토리 경로
protected static $viewDir