blockBlock
We define a class called a 'block'. This can contain multiple 'blocklet' elements which fill up a block top-to-bottom. A block can be divided into multiple columns, and blocklets fill these left-to-right. Blocklets can be of several defined blocklet_types: Text, List, Ordered list, Bullets, and Table A blocklet can also have a heading and a ruler defined for it, with various formatting properties. Provision is also made for inserting special 'tags' into the blocklet content which are translated by the system accordingly. These are: Data - tags to access database information Images - reference to a resident image Links - A clickable link (url) Doc links - A link to a resident document file
Located in /block-defs.php (line 85)
RenderableObject | --block
mixed
$background_colour
= "" (line 112)
Colour of block background
mixed
$background_img
= NULLVALUE (line 114)
Background image - ID from ax_catalog table, if defined
mixed
$blockfm
= "" (line 141)
The form name for the current block @access private
mixed
$blockid
= 0 (line 90)
The id of the current block
mixed
$blocklets
= array() (line 124)
Array of blocklet objects in this block
mixed
$blocklet_sep
= 0 (line 106)
Vertical separation of blocklets in pixels
mixed
$block_desc
(line 92)
The description of the current block
mixed
$block_style
= "" (line 120)
Manual style entered by user
mixed
$block_type
= "" (line 137)
Type of block, ""=empty, "b"=block content, "w"=wysiwyg, "p"=plain cell
mixed
$border_colour
= "" (line 110)
Colour of border
mixed
$border_width
= 0 (line 108)
Width of border in pixels
mixed
$cols
= 1 (line 100)
The number of columns in this block
mixed
$exists
= false (line 88)
Whether the block exists in database or not
mixed
$exportable
= false (line 122)
If true, then an EXPORT button will be provided for CSV dump
mixed
$gutter_colour
= "" (line 104)
Colour of inter-column gutter
mixed
$gutter_width
= 0 (line 102)
Width of inter-column gutter in pixels
mixed
$justify
= "" (line 116)
Justification: 'left', 'center', 'right'
mixed
$language
= 0 (line 94)
The language of the block (0 = default)
mixed
$lang_direction
= "" (line 98)
The language text direction
mixed
$lang_encoding
= "" (line 96)
The language encoding code
mixed
$layoutid
(line 126)
The layout this block belongs to
mixed
$layout_lang_direction
= "" (line 135)
The language direction for the containing layout
mixed
$layout_lang_encoding
= "" (line 133)
The language encoding for the containing layout
mixed
$layout_version
= VERSION_UNDEFINED (line 129)
Version of layout this block belongs to (optional). If present
mixed
$layout_version_count
= 0 (line 131)
Count of layout versions in existence.
mixed
$mode
= "viewing" (line 143)
Mode of operation, 'viewing', 'editing', 'saving' @access private
mixed
$valign
= "" (line 118)
Vertical alignment: 'top', 'middle', 'bottom'
Constructor Create a new block object.
Blocks are self-contained entities, and so this constructor is written to return the rendered block content. This just allows you to avoid having to make the render() call, and use the constructor to return the block content in one hit.
Provide a blockeditor. This is used to instantiate a blockeditor object for when we need to change this block somewhow. We only need one, so we check if it's already been done first.
Add a new blocklet to the block.
This adds a new blocklet to the list, but does not add any records to the database.
Render the block content as a CSV formatted stream. This is designed to facilitate the exporting of complex tables of data as CSV format for importing into spreadsheets, or databases etc.
Delete this block from the database. NB: we do not rely on RI to do this since various versions of Postgres don't support this nicely.
All related entities are explicitly deleted in a transaction.
Get the block.
Retrieves the specified block from database.
Render the block content according to the mode of operation we are in. Possible modes: 'viewing', 'editing', 'saving'.
Index the block.
Index all blocklets of this block using Lucene, if Lucene indexing is enabled (via the configvalue 'Lucene Site Indexing'). This has no effect unless you are using the Axyl framework. Notes: This method indexes the blocklets in this block which are at the present time in the database, ie. not the blocklets as defined in this block object. This method is usually called from the POSTprocess() method, just after saving any changes to the database.
Save the block.
Save this block to the database. Create a new one if it doesn't already exist.
Remove blocklet from the block.
We remove the entry from the block_blocklet link table, and, if it is the last link involving the blocklet we delete the blocklet record.
Replicate this block into a new block with a new set of blocklets as a complete content copy of this original block.
NOTE: We end up with this current block as the replicated one.
Un-index the block.
Un-index this block from Lucene, if Lucene indexing is enabled (via the configvalue 'Lucene Site Indexing'). This has no effect if you are not using the Axyl framework.
Return true if the current user is permitted to edit block details.
We allow editing only for versions VERSION_PENDING and VERSION_LIVE and the latter only for Editors.
Inherited From RenderableObject
RenderableObject::RenderableObject()
RenderableObject::html()
RenderableObject::render()
RenderableObject::wml()
RenderableObject::wmlup()
RenderableObject::xml()
Documentation generated by phpDocumentor 1.3.0RC3