PHP Class igaster\laravelTheme\Themes

Afficher le fichier Open project: igaster/laravel-theme Class Usage Examples

Méthodes publiques

Свойство Type Description
$activeTheme
$root

Méthodes publiques

Méthode 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

Méthode Description
HtmlAttributes ( array $attributes ) : string Return attributes in html format

Method Details

__construct() public méthode

public __construct ( )

add() public méthode

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

config() public méthode

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

configSet() public méthode

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

css() public méthode

Return css link for $href
public css ( string $href ) : string
$href string
Résultat string

current() public méthode

public current ( )

exists() public méthode

Check if $themeName is a valid Theme
public exists ( string $themeName ) : boolean
$themeName string
Résultat boolean

find() public méthode

Find a Theme (by name)
public find ( string $themeName ) : Theme
$themeName string
Résultat Theme

get() public méthode

Get active's Theme Name
public get ( ) : string
Résultat string

img() public méthode

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

js() public méthode

Return script link for $href
public js ( string $href ) : string
$href string
Résultat string

set() public méthode

Set $themeName is the active Theme
public set ( string $themeName ) : void
$themeName string
Résultat void

url() public méthode

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
Résultat string

Property Details

$activeTheme public_oe property

public $activeTheme

$root public_oe property

public $root