PHP 클래스 Caffeinated\Themes\Themes

파일 보기 프로젝트 열기: caffeinated/themes

보호된 프로퍼티들

프로퍼티 타입 설명
$active string
$config Illuminate\Config\Repository
$files Illuminate\Filesystem\Filesystem
$layout string
$path string
$viewFactory View

공개 메소드들

메소드 설명
__construct ( Illuminate\Filesystem\Filesystem $files, Illuminate\Config\Repository $config, Illuminate\View\Factory $viewFactory ) Constructor method.
all ( ) : Illuminate\Database\Eloquent\Collection Get all themes.
asset ( $asset ) : string Generate a HTML link to the given asset using HTTP for the currently active theme.
exists ( string $theme ) : boolean Check if given theme exists.
getActive ( ) : string Gets active theme.
getJsonContents ( string $theme ) : array | mixed Get theme JSON content as an array.
getJsonPath ( string $theme ) : string Get path of theme JSON file.
getLayout ( ) : string Get theme layout.
getPath ( ) : string Gets themes path.
getProperty ( string $property, null | string $default = null ) : mixed Get a theme manifest property value.
getThemePath ( string $theme ) : string Gets the specified themes path.
getView ( string $view ) : string | null Gets the given view file.
register ( ) : null Register custom namespaces for all themes.
registerNamespace ( string $theme ) : null Register custom namespaces for specified theme.
response ( string $view, array $data = [], integer $status = 200, array $headers = [] ) : Response Return a new theme view response from the application.
secureAsset ( $asset ) : string Generate a HTML link to the given asset using HTTPS for the currently active theme.
setActive ( $theme ) : Themes Sets active theme.
setJsonContents ( string $theme, array $content ) : integer Set theme manifest JSON content property value.
setLayout ( $layout ) : Themes Sets theme layout.
setPath ( string $path ) : self Sets themes path.
setProperty ( string $property, mixed $value ) : boolean Set a theme manifest property value.
view ( string $view, array $data = [] ) : View Render theme view file.
viewExists ( string $view ) : boolean Checks if the given view file exists (anywhere).

보호된 메소드들

메소드 설명
getModuleView ( string $view ) : null | string Get module view file.
getThemeNamespace ( string $key, $theme = null ) : string Get the specified themes View namespace.

메소드 상세

__construct() 공개 메소드

Constructor method.
public __construct ( Illuminate\Filesystem\Filesystem $files, Illuminate\Config\Repository $config, Illuminate\View\Factory $viewFactory )
$files Illuminate\Filesystem\Filesystem
$config Illuminate\Config\Repository
$viewFactory Illuminate\View\Factory

all() 공개 메소드

Get all themes.
public all ( ) : Illuminate\Database\Eloquent\Collection
리턴 Illuminate\Database\Eloquent\Collection

asset() 공개 메소드

Generate a HTML link to the given asset using HTTP for the currently active theme.
public asset ( $asset ) : string
리턴 string

exists() 공개 메소드

Check if given theme exists.
public exists ( string $theme ) : boolean
$theme string
리턴 boolean

getActive() 공개 메소드

Gets active theme.
public getActive ( ) : string
리턴 string

getJsonContents() 공개 메소드

Get theme JSON content as an array.
public getJsonContents ( string $theme ) : array | mixed
$theme string
리턴 array | mixed

getJsonPath() 공개 메소드

Get path of theme JSON file.
public getJsonPath ( string $theme ) : string
$theme string
리턴 string

getLayout() 공개 메소드

Get theme layout.
public getLayout ( ) : string
리턴 string

getModuleView() 보호된 메소드

Get module view file.
protected getModuleView ( string $view ) : null | string
$view string
리턴 null | string

getPath() 공개 메소드

Gets themes path.
public getPath ( ) : string
리턴 string

getProperty() 공개 메소드

Get a theme manifest property value.
public getProperty ( string $property, null | string $default = null ) : mixed
$property string
$default null | string
리턴 mixed

getThemeNamespace() 보호된 메소드

Get the specified themes View namespace.
protected getThemeNamespace ( string $key, $theme = null ) : string
$key string
리턴 string

getThemePath() 공개 메소드

Gets the specified themes path.
public getThemePath ( string $theme ) : string
$theme string
리턴 string

getView() 공개 메소드

Gets the given view file.
public getView ( string $view ) : string | null
$view string
리턴 string | null

register() 공개 메소드

Register custom namespaces for all themes.
public register ( ) : null
리턴 null

registerNamespace() 공개 메소드

Register custom namespaces for specified theme.
public registerNamespace ( string $theme ) : null
$theme string
리턴 null

response() 공개 메소드

Return a new theme view response from the application.
public response ( string $view, array $data = [], integer $status = 200, array $headers = [] ) : Response
$view string
$data array
$status integer
$headers array
리턴 Symfony\Component\HttpFoundation\Response

secureAsset() 공개 메소드

Generate a HTML link to the given asset using HTTPS for the currently active theme.
public secureAsset ( $asset ) : string
리턴 string

setActive() 공개 메소드

Sets active theme.
public setActive ( $theme ) : Themes
리턴 Themes

setJsonContents() 공개 메소드

Set theme manifest JSON content property value.
public setJsonContents ( string $theme, array $content ) : integer
$theme string
$content array
리턴 integer

setLayout() 공개 메소드

Sets theme layout.
public setLayout ( $layout ) : Themes
리턴 Themes

setPath() 공개 메소드

Sets themes path.
public setPath ( string $path ) : self
$path string
리턴 self

setProperty() 공개 메소드

Set a theme manifest property value.
public setProperty ( string $property, mixed $value ) : boolean
$property string
$value mixed
리턴 boolean

view() 공개 메소드

Render theme view file.
public view ( string $view, array $data = [] ) : View
$view string
$data array
리턴 View

viewExists() 공개 메소드

Checks if the given view file exists (anywhere).
public viewExists ( string $view ) : boolean
$view string
리턴 boolean

프로퍼티 상세

$active 보호되어 있는 프로퍼티

protected string $active
리턴 string

$config 보호되어 있는 프로퍼티

protected Repository,Illuminate\Config $config
리턴 Illuminate\Config\Repository

$files 보호되어 있는 프로퍼티

protected Filesystem,Illuminate\Filesystem $files
리턴 Illuminate\Filesystem\Filesystem

$layout 보호되어 있는 프로퍼티

protected string $layout
리턴 string

$path 보호되어 있는 프로퍼티

protected string $path
리턴 string

$viewFactory 보호되어 있는 프로퍼티

protected View $viewFactory
리턴 View