PHP 클래스 Habari\Themes

파일 보기 프로젝트 열기: habari/system

공개 메소드들

메소드 설명
activate_theme ( $theme_name, $theme_dir ) function activate_theme Updates the database with the name of the new theme to use
cancel_preview ( ) Cancel the viewing of any preview theme
class_from_filename ( $file, $check_realpath = false )
create ( string $name = null, string $template_engine = null, string $theme_dir = null ) : Theme Returns a named Theme descendant.
get_active ( $nopreview = false ) : QueryRecord Returns the active theme information from the database
get_active_data ( $nopreview = false ) : array Returns theme information for the active theme -- dir, path, theme.xml, screenshot url
get_all ( ) : array Returns the theme dir and path information
get_all_data ( ) : array Returns all theme information -- dir, path, theme.xml, screenshot url
get_theme_classes ( ) : array Get a list of classes that extend Theme
get_theme_dir ( $nopreview = false ) : string Returns the name of the active or previewed theme
preview_theme ( string $theme_name, string $theme_dir ) Sets a theme to be the current user's preview theme
validate_theme ( string $theme_dir ) : boolean Ensure that a theme meets requirements for activation/preview

비공개 메소드들

메소드 설명
get_active_theme_dir ( $nopreview = false ) : string Returns the active theme's full directory path.
get_by_name ( $name )

메소드 상세

activate_theme() 공개 정적인 메소드

function activate_theme Updates the database with the name of the new theme to use
public static activate_theme ( $theme_name, $theme_dir )

cancel_preview() 공개 정적인 메소드

Cancel the viewing of any preview theme
public static cancel_preview ( )

class_from_filename() 공개 정적인 메소드

public static class_from_filename ( $file, $check_realpath = false )

create() 공개 정적인 메소드

If no parameter is supplied, then load the active theme from the database. If no theme option is set, a fatal error is thrown
public static create ( string $name = null, string $template_engine = null, string $theme_dir = null ) : Theme
$name string ( optional ) override the default theme lookup
$template_engine string ( optional ) specify a template engine
$theme_dir string ( optional ) specify a theme directory
리턴 Theme An instance of the requested theme or the default theme

get_active() 공개 정적인 메소드

Returns the active theme information from the database
public static get_active ( $nopreview = false ) : QueryRecord
리턴 QueryRecord An array of Theme data

get_active_data() 공개 정적인 메소드

Returns theme information for the active theme -- dir, path, theme.xml, screenshot url
public static get_active_data ( $nopreview = false ) : array
리턴 array An array of Theme data

get_all() 공개 정적인 메소드

Returns the theme dir and path information
public static get_all ( ) : array
리턴 array An array of Theme data

get_all_data() 공개 정적인 메소드

Returns all theme information -- dir, path, theme.xml, screenshot url
public static get_all_data ( ) : array
리턴 array An array of Theme data

get_theme_classes() 공개 정적인 메소드

Get a list of classes that extend Theme
public static get_theme_classes ( ) : array
리턴 array List of string names of classes that extend Theme

get_theme_dir() 공개 정적인 메소드

Returns the name of the active or previewed theme
public static get_theme_dir ( $nopreview = false ) : string
리턴 string the current theme or previewed theme's directory name

preview_theme() 공개 정적인 메소드

Sets a theme to be the current user's preview theme
public static preview_theme ( string $theme_name, string $theme_dir )
$theme_name string The name of the theme to preview
$theme_dir string The directory of the theme to preview

validate_theme() 공개 정적인 메소드

Ensure that a theme meets requirements for activation/preview
public static validate_theme ( string $theme_dir ) : boolean
$theme_dir string the directory of the theme
리턴 boolean True if the theme meets all requirements