SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class Widgets

Provided functions for the display of widgets

Variables

NameVisibilityDescription
$widget_areas (static) 

Functions

NameVisibilityDescription
addpublic (static)Add a widget to the list of widgets for a specific area
areapublic (static)Render a widget area, and output directly
checkDisplayConditionspublic (static)Check whether the widget is allowed to be displayed
hasWidgetspublic (static)Does the specified widget area have widgets?
infoboxprivate (static)Render extra widget info for admins
instantiatepublic (static)Create an instance of a specific widget in memory
removepublic (static)Remove a widget to the list of widgets for a specific area
renderpublic (static)Instantiate, import settings, and render
renderAreapublic (static)Draw the widgets for a specific area

public add

void Widgets::add ( int $area_id , string $name , array $settings [, string $heading [, string $template ]] );

Add a widget to the list of widgets for a specific area

public area

void Widgets::area ( mixed $area_name );

Render a widget area, and output directly

public checkDisplayConditions

bool Widgets::checkDisplayConditions ( array $env , array $conditions );

Check whether the widget is allowed to be displayed

public hasWidgets

unknown Widgets::hasWidgets ( string $area_name );

Does the specified widget area have widgets?

private infobox

unknown Widgets::infobox ( mixed $inst );

Render extra widget info for admins

public instantiate

Widget Widgets::instantiate ( string $name );

Create an instance of a specific widget in memory

public remove

void Widgets::remove ( int $area_id , string $name );

Remove a widget to the list of widgets for a specific area

public render

string Widgets::render ( int $orientation , string $name , array $settings [, string $pre_html [, string $post_html [, string $heading [, string $template ]]]] );

Instantiate, import settings, and render

public renderArea

string Widgets::renderArea ( string $area_name );

Draw the widgets for a specific area

The available widget areas are defined in the /config/sprout.php file.
Typically there are two areas defined, 'sidebar' and 'embedded'.