Public Member Functions | Static Public Member Functions | Public Attributes

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 (FormUI $form)
 add_to_area ($area, $order=null, $scope=null)
 __toString ()

Static Public Member Functions

static default_fields ()

Public Attributes

 $_first = false
 $_last = false
 $_area_index = 0
 $_area = ''

Detailed Description

Definition at line 19 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 31 of file block.php.


Member Function Documentation

Block::__get ( name  ) 

Overrides QueryRecord __get to implement custom object properties

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

Definition at line 51 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 121 of file block.php.

Block::__set ( name,
value 
)

Overrides QueryRecord __set to implement custom object properties

Parameters:
string $name Name of property to return
mixed $value The value to set the property to
Returns:
mixed The value of the property

Definition at line 94 of file block.php.

Block::__toString (  ) 

Convert this block into a string, just in case there isn't a template associated to this block type

Returns:
string The string representation of this content, as a bad fallback

Definition at line 358 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 331 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 160 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 130 of file block.php.

Block::delete (  ) 

Delete this block

Definition at line 277 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 146 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 209 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 197 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 302 of file block.php.

Block::insert (  ) 

Insert this block into the database

Returns:
boolean|null True on success, null if the action wasn't allowed

Definition at line 219 of file block.php.

Referenced by add_to_area().

Block::save_block ( FormUI form  ) 

Display a standard success message upon saving the form

Parameters:
FormUI $form The form that will be saved
Returns:
bool Returning false tells the form that the save was handled

Definition at line 318 of file block.php.

Block::unserialize_data (  ) 

Unserialize the stored block data

Definition at line 184 of file block.php.

Referenced by __construct(), and __set().

Block::update (  ) 

Update this block in the database

Returns:
boolean|null True on success, null if the update isn't allowed

Definition at line 253 of file block.php.


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