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 92)
RenderableObject | --block
mixed
$author_groups
= array(DEFAULT_AUTHOR_GROUPS) (line 156)
The group membership for Authoring privilege
mixed
$background_colour
= "" (line 119)
Colour of block background
mixed
$background_img
= NULLVALUE (line 121)
Background image - ID from ax_catalog table, if defined
mixed
$blockfm
= "" (line 148)
The form name for the current block @access private
mixed
$blockid
= 0 (line 97)
The id of the current block
mixed
$blocklets
= array() (line 131)
Array of blocklet objects in this block
mixed
$blocklet_sep
= 0 (line 113)
Vertical separation of blocklets in pixels
mixed
$block_desc
= "" (line 99)
The description of the current block
mixed
$block_style
= "" (line 127)
Manual style entered by user
mixed
$block_type
= "" (line 144)
Type of block, ""=empty, "b"=block content, "w"=wysiwyg, "p"=plain cell
mixed
$border_colour
= "" (line 117)
Colour of border
mixed
$border_width
= 0 (line 115)
Width of border in pixels
mixed
$cols
= 1 (line 107)
The number of columns in this block
mixed
$editor_groups
= array(DEFAULT_EDITOR_GROUPS) (line 153)
The group membership for Editor privilege
mixed
$entry_groups
= array(DEFAULT_ENTRY_GROUPS) (line 159)
The group membership for Entry privilege
mixed
$exists
= false (line 95)
Whether the block exists in database or not
mixed
$exportable
= false (line 129)
If true, then an EXPORT button will be provided for CSV dump
mixed
$gutter_colour
= "" (line 111)
Colour of inter-column gutter
mixed
$gutter_width
= 0 (line 109)
Width of inter-column gutter in pixels
mixed
$justify
= "" (line 123)
Justification: 'left', 'center', 'right'
mixed
$language
= 0 (line 101)
The language of the block (0 = default)
mixed
$lang_direction
= "" (line 105)
The language text direction
mixed
$lang_encoding
= "" (line 103)
The language encoding code
mixed
$layoutid
(line 133)
The layout this block belongs to
mixed
$layout_lang_direction
= "" (line 142)
The language direction for the containing layout
mixed
$layout_lang_encoding
= "" (line 140)
The language encoding for the containing layout
mixed
$layout_version
= VERSION_UNDEFINED (line 136)
Version of layout this block belongs to (optional). If present
mixed
$layout_version_count
= 0 (line 138)
Count of layout versions in existence.
mixed
$mode
= "viewing" (line 150)
Mode of operation, 'viewing', 'editing', 'saving' @access private
mixed
$valign
= "" (line 125)
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 a search engine, if Search Engine indexing is enabled (via the configvalue 'Search Engine Host'). 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 the search engine, if indexing is enabled (via the configvalue 'Search Engine Host'). 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