PHP Class BaseThemelet, shimmie2

A collection of common functions for theme parts
显示文件 Open project: shish/shimmie2

Public Methods

Method Description
build_thumb_html ( Image $image ) : string Generic thumbnail code; returns HTML rather than adding a block since thumbs tend to go inside blocks.
display_error ( integer $code, string $title, string $message ) Generic error message display
display_paginator ( Page $page, string $base, string $query, integer $page_number, integer $total_pages, boolean $show_random = FALSE ) Add a generic paginator.
display_permission_denied ( ) A specific, common error message

Private Methods

Method Description
build_paginator ( integer $current_page, integer $total_pages, string $base_url, string $query, boolean $show_random ) : string Build the paginator.
gen_page_link ( string $base_url, string $query, string $page, string $name ) : string Generate a single HTML link.
gen_page_link_block ( string $base_url, string $query, string $page, integer $current_page, string $name ) : string

Method Details

build_thumb_html() public method

..
public build_thumb_html ( Image $image ) : string
$image Image
return string

display_error() public method

Generic error message display
public display_error ( integer $code, string $title, string $message )
$code integer
$title string
$message string

display_paginator() public method

Add a generic paginator.
public display_paginator ( Page $page, string $base, string $query, integer $page_number, integer $total_pages, boolean $show_random = FALSE )
$page Page
$base string
$query string
$page_number integer
$total_pages integer
$show_random boolean

display_permission_denied() public method

A specific, common error message