PHP Class Karlomikus\Theme\Theme

Author: Karlo Mikuš
Inheritance: implements Karlomikus\Theme\Contracts\ThemeInterface
Datei anzeigen Open project: karlomikus/theme

Public Methods

Method Description
__construct ( Illuminate\Contracts\Container\Container $app ) Setup default view finder and view paths.
all ( ) : array | ThemeInfo[] Get all found themes
get ( $theme = null ) : null | ThemeInfo Returns theme information.
getThemes ( )
has ( $theme ) : boolean Check if theme exists
set ( string $theme ) Set current active theme
setDefaultThemePath ( $path ) Set base themes folder path
themeExists ( $theme )

Private Methods

Method Description
findPath ( $namespace ) : string Find theme views path
findThemeByNamespace ( string $namespace ) : null | ThemeInfo Find a theme from all scanned themes
loadTheme ( string $theme ) Load a theme
parseThemeInfo ( array $info ) : ThemeInfoInterface Parse theme json file
scanThemes ( ) Scan for all available themes

Method Details

__construct() public method

Setup default view finder and view paths.
public __construct ( Illuminate\Contracts\Container\Container $app )
$app Illuminate\Contracts\Container\Container

all() public method

Get all found themes
public all ( ) : array | ThemeInfo[]
return array | ThemeInfo[]

get() public method

Returns theme information.
public get ( $theme = null ) : null | ThemeInfo
return null | ThemeInfo

getThemes() public method

public getThemes ( )

has() public method

Check if theme exists
public has ( $theme ) : boolean
$theme
return boolean

set() public method

Set current active theme
public set ( string $theme )
$theme string Theme namespace

setDefaultThemePath() public method

Set base themes folder path
public setDefaultThemePath ( $path )
$path

themeExists() public method

public themeExists ( $theme )