Block
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
The group membership for Authoring privilege
Colour of block background
Background image - ID from ax_catalog table, if defined
The form name for the current block @access private
The id of the current block
Array of blocklet objects in this block
Vertical separation of blocklets in pixels
The description of the current block
Manual style entered by user
Type of block, ""=empty, "b"=block content, "w"=wysiwyg, "p"=plain cell
Colour of border
Width of border in pixels
The number of columns in this block
The group membership for Editor privilege
The group membership for Entry privilege
Whether the block exists in database or not
If true, then an EXPORT button will be provided for CSV dump
Colour of inter-column gutter
Width of inter-column gutter in pixels
Justification: 'left', 'center', 'right'
The language of the block (0 = default)
The language text direction
The language encoding code
The layout this block belongs to
The language direction for the containing layout
The language encoding for the containing layout
Version of layout this block belongs to (optional). If present
Count of layout versions in existence.
Mode of operation, 'viewing', 'editing', 'saving' @access private
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