Public Member Functions | Static Public Member Functions

Block Class Reference

Inheritance diagram for Block:
Collaboration diagram for Block:

List of all members.

Public Member Functions

 __construct ($paramarray=array())
 __get ($name)
 __set ($name, $value)
 __isset ($name)
 fetch ($theme)
 content_type ()
 unserialize_data ()
 field_save ($key, $value)
 field_load ($key)
 insert ()
 update ()
 delete ()
 get_form ()
 save_block ($form)
 add_to_area ($area, $order=null, $scope=null)

Static Public Member Functions

static default_fields ()

Detailed Description

Habari Block class Block class for theme display of pluggable content

Definition at line 12 of file block.php.


Constructor & Destructor Documentation

Block::__construct ( paramarray = array()  ) 

Constructor for the Block class.

Parameters:
array $paramarray an associative array of initial block field values.

Definition at line 20 of file block.php.


Member Function Documentation

Block::__get ( name  ) 

Overrides QueryRecord __get to implement custom object properties

Parameters:
string Name of property to return
Returns:
mixed The requested field value

Definition at line 40 of file block.php.

Referenced by __set().

Block::__isset ( name  ) 

Overrides QueryRecord __isset, returns whether this Block has the named data. Falls back to QueryRecord's __isset.

Parameters:
string $name The name of the parameter
Returns:
boolean True if the value is set, false if not

Definition at line 108 of file block.php.

Block::__set ( name,
value 
)

Overrides QueryRecord __set to implement custom object properties

Parameters:
string Name of property to return
Returns:
mixed The requested field value

Definition at line 81 of file block.php.

Block::add_to_area ( area,
order = null,
scope = null 
)

Add this block to a particular area in the theme

Parameters:
string $area The name of the area to add to
integer $order The position of the block within the area
string $scope The scope id into which to add this block

Definition at line 322 of file block.php.

Block::content_type (  ) 

Return the content types that this object represents

See also:
IsContent
Returns:
array An array of strings representing the content type of this object

Definition at line 147 of file block.php.

static Block::default_fields (  )  [static]

Return the defined database columns for a Block.

Returns:
array Array of columns in the Block table

Definition at line 117 of file block.php.

Block::delete (  ) 

Delete this block

Definition at line 264 of file block.php.

Block::fetch ( theme  ) 

Render and return the block content

Parameters:
Theme $theme the theme object with which the block will be rendered
Returns:
string The rendered block content

Definition at line 133 of file block.php.

Block::field_load ( key  ) 

Load the form value from the block

Parameters:
string $key The name of the form field to load
Returns:
mixed The value of the block for the form

Implements FormStorage.

Definition at line 196 of file block.php.

Block::field_save ( key,
value 
)

Saves form fields that are tied to this block. Implements FormStorage.

Parameters:
string $key The name of the form field to store.
mixed $value The value of the form field

Implements FormStorage.

Definition at line 184 of file block.php.

Block::get_form (  ) 

Get the form used to update this block

Returns:
FormUI The altered FormUI element that edits this block

Definition at line 288 of file block.php.

Block::insert (  ) 

Insert this block into the database

Returns:
boolean True on success

Definition at line 206 of file block.php.

Referenced by add_to_area().

Block::save_block ( form  ) 

Display a standard success message upon saving the form

Returns:

Definition at line 309 of file block.php.

Block::unserialize_data (  ) 

Unserialize the stored block data

Definition at line 171 of file block.php.

Referenced by __construct(), and __set().

Block::update (  ) 

Update this block in the database

Returns:
boolean True on success

Definition at line 240 of file block.php.

Referenced by field_save().


The documentation for this class was generated from the following file: