Comments: on this page. Click to read or post your own.

Class VirtualPage

Description

Virtual Page creates an instance of a page, with the same fields that the original page had, but readonly.

This allows you can have a page in mulitple places in the site structure, with different children without duplicating the content Note: This Only duplicates $db fields and not the $has_one etc..

Located in /sapphire/core/model/VirtualPage.php (line 8)

Page
   |
   --VirtualPage
Variable Summary
static mixed $add_action
static mixed $db
static mixed $has_one
static mixed $icon
static mixed $virtualFields
Method Summary
void ContentSource ()
void copyFrom ( $source)
void getCMSFields ([ $cms = null])
void onBeforeWrite ()
Variables
static mixed $add_action = "Virtual page (another page's content)" (line 10)
static mixed $db = array(
"VersionID" => "Int",
)
(line 20)
static mixed $has_one = array(
"CopyContentFrom" => "SiteTree",
)
(line 16)
static mixed $icon = array("cms/images/treeicons/page-shortcut-gold","file") (line 12)
static mixed $virtualFields (line 14)
  • access: public
Methods
ContentSource (line 49)
void ContentSource ()
copyFrom (line 118)

Ensure we have an up-to-date version of everything.

void copyFrom ( $source)
  • $source
getCMSFields (line 57)

Generate the CMS fields from the fields from the original page.

void getCMSFields ([ $cms = null])
  • $cms
getVirtualFields (line 27)

Generates the array of fields required for the page type.

void getVirtualFields ()
onBeforeWrite (line 101)

We have to change it to copy all the content from the original page first.

void onBeforeWrite ()
blog comments powered by Disqus

Documentation generated on Sun, 19 Oct 2008 06:47:36 +1300 by phpDocumentor 1.3.2