PHP Class Gdn_Theme, vanilla

Allows access to theme controls from within views, to give themers a unified toolset for interacting with Vanilla from within views.
Since: 2.0
Author: Mark O'Sullivan ([email protected])
Show file Open project: vanilla/vanilla Class Usage Examples

Protected Properties

Property Type Description
$_AssetInfo array
$_BulletSection
$_BulletSep
$_Section array

Public Methods

Method Description
assetBegin ( string $AssetContainer = 'Panel' )
assetEnd ( )
breadcrumbs ( $Data, boolean $HomeLink = true, array $Options = [] ) : string
bulletItem ( string $Section, boolean $Return = true ) : string Call before writing an item and it will optionally write a bullet seperator.
bulletRow ( strng | boolean $Sep = false ) Call before starting a row of bullet-seperated items.
inSection ( string | array $Section ) Returns whether or not the page is in the current section.
link ( $Path, boolean $Text = false, null $Format = null, array $Options = [] ) : mixed | null | string
logo ( array $Properties = [] ) Renders the banner logo, or just the banner title if the logo is not defined.
mobileLogo ( ) : string Returns the mobile banner logo. If there is no mobile logo defined then this will just return the regular logo or the mobile title.
module ( $Name, array $Properties = [] ) : mixed | string
pagename ( ) : string
section ( string $Section, string $Method = 'add' ) The current section the site is in. This can be one or more values. Think of it like a server-side css-class.
text ( $Code, $Default ) : mixed

Method Details

assetBegin() public static method

public static assetBegin ( string $AssetContainer = 'Panel' )
$AssetContainer string

assetEnd() public static method

public static assetEnd ( )

breadcrumbs() public static method

public static breadcrumbs ( $Data, boolean $HomeLink = true, array $Options = [] ) : string
$Data
$HomeLink boolean
$Options array
return string

bulletItem() public static method

Call before writing an item and it will optionally write a bullet seperator.
Since: 2.1
public static bulletItem ( string $Section, boolean $Return = true ) : string
$Section string The name of the section.
$Return boolean whether or not to return the result or echo it.
return string

bulletRow() public static method

Call before starting a row of bullet-seperated items.
Since: 2.1
public static bulletRow ( strng | boolean $Sep = false )
$Sep strng | boolean The seperator used to seperate each section.

inSection() public static method

Returns whether or not the page is in the current section.
public static inSection ( string | array $Section )
$Section string | array

module() public static method

public static module ( $Name, array $Properties = [] ) : mixed | string
$Name
$Properties array
return mixed | string

pagename() public static method

public static pagename ( ) : string
return string

section() public static method

The current section the site is in. This can be one or more values. Think of it like a server-side css-class.
Since: 2.1
public static section ( string $Section, string $Method = 'add' )
$Section string The name of the section.
$Method string One of: add, remove, set, get.

text() public static method

public static text ( $Code, $Default ) : mixed
$Code
$Default
return mixed

Property Details

$_AssetInfo protected static property

protected static array $_AssetInfo
return array

$_BulletSection protected static property

protected static $_BulletSection

$_BulletSep protected static property

protected static $_BulletSep

$_Section protected static property

protected static array $_Section
return array