Canvas

Return to documentation ↩

public $form_wrap
public $slideshow
public $tables
public $template
protected $value
protected $objects
public __construct($template=null)
Initiates Canvas class
string $template Template
public __destruct()
Terminates object, closes the database connection
return void
public __toString()
Return template unevaluated
return string
public hook($orbit=null)
Perform Orbit hook
Orbit $orbit
return void
public append($template)
Append a string to the template
string $template String to append
return void
public load($filename)
Append a file's contents to the template
string $filename Filename (pulled from the installation's theme folder)
return void
public assign($var, $value, $empty=false)
Assign a template variable
string $var
string $value
string $empty Assign empty (but set) variables such as the integer zero
return bool True if successful
public assignArray($array, $empty=false)
Assign template variables via an associative array
array $array
string $empty Assign empty (but set) variables such as the integer zero
return bool True if successful
public setTitle($title=null)
Set the variable (specially formatted)
string $title
return bool True if successful
public setBreadcrumb($array)
Set the HTML5 microdata breadcrumb variable
array $links Associative array of links (title => URI)
return bool True if successful
public loop($object, $offset=0, $length=null)
Set a image object to process blocks and nested blocks
Image $object Image object
return bool True if successful
public slideshow($bool=true)
Set template as a slideshow
bool $bool True if slideshow
return bool True if successful
public wrapForm($bool=true)
Set a template to accept comments
bool $bool True if wrap in for comments
return bool True if successful
public initDefines()
Process PHP definitions
return void
public initCounts()
Process block counts
return void
public filter($filters)
Execute Canvas filters
string $filters Filters
return void
public urlencode()
Perform urlencode() filter
return string
public fit50()
Fit string by 50 characters, cut at word
return void
public reltime()
Make a relative time
return void
public fit100()
Fit string by 100 characters, cut at word
return void
public fit250()
Fit string by 250 characters, cut at word
return void
public fit500()
Fit string by 500 characters, cut at word
return void
public fit1000()
Fit string by 1000 characters, cut at word
return void
public urlize()
Perform Alkaline::makeURL filter
return string
public excerpt()
Show first paragraph
return string
public alpha()
Convert number to words
return string
public alpha0()
Convert number to words (except zero)
return string
public pluralize()
Add S to make plural
return void
public upperwords()
Make words uppercase
return string
public upperfirst()
Make first word uppercase
return string
public sterilize()
Strip PHP and HTML tags
return string
public scrub($var, $template, $suffix=null)
Remove conditionals after successful variable, loop placement
string $var Variable
string $template Template
string $suffix Suffix ('Class' as {ifClass:})
return string Template
public scrubEmpty($template)
Remove unmatched conditionals before displaying
string $template Template
return string Template
public scrubClasses($template)
Process extension Class conditionals before displaying
string $template Template
return string Template
public generate()
Generate template
return void
public display()
Generate template, execute PHP, and echo results
return string
protected loopSub($array, $template, $field, $id)
Process nested blocks
string $array
string $template
string $field
string $id
return void
protected initOrbit()
Process Orbit hooks as insertions {hook:Hookname}
return void
protected initConfig()
Process configuration insertions {config:Configname}
return void
protected initIncludes()
Process Canvas includes as insertions {include:Filename}
return void