PHP Class igaster\laravelTheme\Themes

Datei anzeigen Open project: igaster/laravel-theme Class Usage Examples

Public Properties

Property Type Description
$activeTheme
$root

Public Methods

Method Description
__construct ( )
add ( Theme $theme, string $parentName = '' ) : Theme Add a new theme to the hierarcy. Optionaly define a parent theme.
config ( string $key, $defaultValue = null ) : mixed Return current theme's configuration value for $key
configSet ( string $key, $value ) : mixed Set current theme's configuration value for $key
css ( string $href ) : string Return css link for $href
current ( )
exists ( string $themeName ) : boolean Check if $themeName is a valid Theme
find ( string $themeName ) : Theme Find a Theme (by name)
get ( ) : string Get active's Theme Name
img ( string $src, string $alt = '', string $Class = '', array $attributes = [] ) : string Return img tag
js ( string $href ) : string Return script link for $href
set ( string $themeName ) : void Set $themeName is the active Theme
url ( string $url ) : string Attach current theme's paths to a local Url. The Url must be a resource located on the asset path of the current theme or it's parents.

Private Methods

Method Description
HtmlAttributes ( array $attributes ) : string Return attributes in html format

Method Details

__construct() public method

public __construct ( )

add() public method

Add a new theme to the hierarcy. Optionaly define a parent theme.
public add ( Theme $theme, string $parentName = '' ) : Theme
$theme Theme
$parentName string
return Theme

config() public method

Return current theme's configuration value for $key
public config ( string $key, $defaultValue = null ) : mixed
$key string
return mixed

configSet() public method

Set current theme's configuration value for $key
public configSet ( string $key, $value ) : mixed
$key string
return mixed

css() public method

Return css link for $href
public css ( string $href ) : string
$href string
return string

current() public method

public current ( )

exists() public method

Check if $themeName is a valid Theme
public exists ( string $themeName ) : boolean
$themeName string
return boolean

find() public method

Find a Theme (by name)
public find ( string $themeName ) : Theme
$themeName string
return Theme

get() public method

Get active's Theme Name
public get ( ) : string
return string

img() public method

Return img tag
public img ( string $src, string $alt = '', string $Class = '', array $attributes = [] ) : string
$src string
$alt string
$Class string
$attributes array
return string

js() public method

Return script link for $href
public js ( string $href ) : string
$href string
return string

set() public method

Set $themeName is the active Theme
public set ( string $themeName ) : void
$themeName string
return void

url() public method

Attach current theme's paths to a local Url. The Url must be a resource located on the asset path of the current theme or it's parents.
public url ( string $url ) : string
$url string
return string

Property Details

$activeTheme public_oe property

public $activeTheme

$root public_oe property

public $root