PHP Класс igaster\laravelTheme\Themes

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$activeTheme
$root

Открытые методы

Метод Описание
__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.

Приватные методы

Метод Описание
HtmlAttributes ( array $attributes ) : string Return attributes in html format

Описание методов

__construct() публичный Метод

public __construct ( )

add() публичный Метод

Add a new theme to the hierarcy. Optionaly define a parent theme.
public add ( Theme $theme, string $parentName = '' ) : Theme
$theme Theme
$parentName string
Результат Theme

config() публичный Метод

Return current theme's configuration value for $key
public config ( string $key, $defaultValue = null ) : mixed
$key string
Результат mixed

configSet() публичный Метод

Set current theme's configuration value for $key
public configSet ( string $key, $value ) : mixed
$key string
Результат mixed

css() публичный Метод

Return css link for $href
public css ( string $href ) : string
$href string
Результат string

current() публичный Метод

public current ( )

exists() публичный Метод

Check if $themeName is a valid Theme
public exists ( string $themeName ) : boolean
$themeName string
Результат boolean

find() публичный Метод

Find a Theme (by name)
public find ( string $themeName ) : Theme
$themeName string
Результат Theme

get() публичный Метод

Get active's Theme Name
public get ( ) : string
Результат string

img() публичный Метод

Return img tag
public img ( string $src, string $alt = '', string $Class = '', array $attributes = [] ) : string
$src string
$alt string
$Class string
$attributes array
Результат string

js() публичный Метод

Return script link for $href
public js ( string $href ) : string
$href string
Результат string

set() публичный Метод

Set $themeName is the active Theme
public set ( string $themeName ) : void
$themeName string
Результат void

url() публичный Метод

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
Результат string

Описание свойств

$activeTheme публичное свойство

public $activeTheme

$root публичное свойство

public $root