Class named_layout

Description

Named Layout. A named layout is just another way of grabbing a layout,

but by name, rather than by ID. A given "name" can have multiple versions in existence, if it has been published, and these will all have unique ID's, so this class is concerned with sorting out which version of a named layout is required, and acquiring the correct layout ID.

Located in /layout-defs.php (line 1385)

RenderableObject
   |
   --layout
      |
      --named_layout
Variable Summary
Method Summary
 named_layout named_layout ([string $name = ""], [integer $version = VERSION_UNDEFINED])
 void html ()
 void index ()
 void POSTprocess ()
 void publish ()
 void unindex ()
 void unpublish ()
Variables
Methods
Constructor named_layout (line 1413)

Constructor

Create a new named_layout object. A named layout is a layout which is identified by its name, and by the version. Versions are numbered from zero (0), which represents the most recent. The higher the version number, the further back in time you go. We define three special version numbers: VERSION_PENDING (0) The layout waiting to be made live VERSION_LIVE (1) The currently live layout VERSION_PREVIOUS (2) The version previously live Accordingly, these versions are the most recent three in the set of all versions of the layout.

named_layout named_layout ([string $name = ""], [integer $version = VERSION_UNDEFINED])
  • string $name: Layout name
  • integer $version: Version number, (zero=most recent)
html (line 1578)

Return HTML for this named layout.

void html ()

Redefinition of:
layout::html()
Render the block content according to the mode of operation we are in. Possible modes: 'viewing', 'editing', 'saving'.
index (line 1519)

Index the named layout. We only do this if the layout version is LIVE or there is only a single version in existence.

void index ()

Redefinition of:
layout::index()
Index all blocks in this layout.
POSTprocess (line 1591)

Process a block edit form POST.

access private

void POSTprocess ()
publish (line 1548)

Publish a pending named layout. All we do in fact, is to replicate the current pending version of the layout (this one) into a new version. That automatically makes this layout the current LIVE one, and the newly created version becomes the new PENDING one.

void publish ()
unindex (line 1536)

Un-Index the named layout. We only do this if the layout version is LIVE or there is only a single version in existence.

void unindex ()

Redefinition of:
layout::unindex()
Un-Index all blocks in this layout. After calling this method all the bloacks in the layout will have been removed from the Lucene index.
unpublish (line 1561)

Un-Publish a live named layout. This simply deletes the current pending version of the layout. That makes the current LIVE version the new pending version.

void unpublish ()

Inherited Methods

Inherited From layout

 layout::layout()
 layout::activate_editing()
 layout::delete()
 layout::get()
 layout::html()
 layout::index()
 layout::is_pendingver()
 layout::paste_layout()
 layout::put()
 layout::replicate()
 layout::unindex()
 layout::user_can_edit()

Inherited From RenderableObject

 RenderableObject::RenderableObject()
 RenderableObject::html()
 RenderableObject::render()
 RenderableObject::wml()
 RenderableObject::wmlup()
 RenderableObject::xml()

Documentation generated by phpDocumentor 1.3.0RC3