Class layouteditor

Description

Layouteditor

A layouteditor is a utility class. It contains all of the methods required to edit a layout, so that the layout class can concentrate on the basics of layout acquisition and display. The constructor of a layouteditor must be passed a reference to the layout it is going to be providing editing services for.

Located in /layout-editor-defs.php (line 41)

RenderableObject
   |
   --layouteditor
Variable Summary
 mixed $layout
Method Summary
 layouteditor layouteditor (reference &$layout)
 void delete ()
 void refresh (reference &$layout)
 void replicate ([string $layoutname = ""])
Variables
mixed $layout (line 47)

The layout we are providing

Methods
Constructor layouteditor (line 54)

Constructor Create a new layouteditor object.

layouteditor layouteditor (reference &$layout)
  • reference $layout: A reference to the layout being edited
delete (line 151)

Delete the hosted layout from the database. Afterwards, the current object still exists as it was before this method was executed, but the $this->layout->exists flag will have been reset to false.

void delete ()
refresh (line 62)

Refresh the layout reference..

void refresh (reference &$layout)
  • reference $layout: A reference to the layout being edited
replicate (line 78)

Replicate the hosted layout as a new layout. Creates a brand new

layout in the database, with same data as this one. The end result is that this current object becomes the new layout, and a duplicate set of layout records exist in the database. The layout ID of this new layout is, of course, updated to being a brand new one. NOTES: The layout name is normally left null, which keeps the layout in the same 'family' of layout versions. You can force the layout name to be different, and this will create a new 'layout_set' record of that name for you, if required.

void replicate ([string $layoutname = ""])
  • string $layoutname: New layout name. If null, keeps same name.

Inherited Methods

Inherited From RenderableObject

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

Documentation generated by phpDocumentor 1.3.0RC3