SilverStripe 2.4 API Docs
  • Package
  • Class
  • Tree
  • Deprecated
Version: master
  • master
  • 3.1
  • 3.0
  • 2.4
  • tagfield

Packages

  • cms
    • assets
    • batchaction
    • batchactions
    • bulkloading
    • comments
    • content
    • core
    • export
    • publishers
    • reports
    • security
    • tasks
  • forms
    • actions
    • core
    • fields-basic
    • fields-dataless
    • fields-datetime
    • fields-files
    • fields-formatted
    • fields-formattedinput
    • fields-relational
    • fields-structural
    • transformations
    • validators
  • installer
  • None
  • PHP
  • sapphire
    • api
    • bulkloading
    • control
    • core
    • cron
    • dev
    • email
    • fields-formattedinput
    • filesystem
    • formatters
    • forms
    • i18n
    • integration
    • misc
    • model
    • parsers
    • search
    • security
    • tasks
    • testing
    • tools
    • validation
    • view
    • widgets

Classes

  • ErrorPage
  • ErrorPage_Controller
  • Notifications
  • SiteConfig
  • SiteTree
  • VirtualPage
  • VirtualPage_Controller

Interfaces

  • HiddenClass

Class VirtualPage

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..

Page
Extended by VirtualPage
Package: cms
Located at sapphire/core/model/VirtualPage.php

Methods summary

public
# getVirtualFields( )

Generates the array of fields required for the page type.

Generates the array of fields required for the page type.

public
# CopyContentFrom( )
public
# setCopyContentFromID( mixed $val )
public
# ContentSource( )
public
# allowedChildren( )
public
# syncLinkTracking( )
public
# canPublish( mixed $member = null )

We can only publish the page if there is a published source page

We can only publish the page if there is a published source page

public
# canDeleteFromLive( mixed $member = null )

Return true if we can delete this page from the live site, which is different from can we publish it.

Return true if we can delete this page from the live site, which is different from can we publish it.

public
# isPublishable( )

Returns true if is page is publishable by anyone at all Return false if the source page isn't published yet.

Returns true if is page is publishable by anyone at all Return false if the source page isn't published yet.

Note that isPublishable doesn't affect ete from live, only publish.

public
# getCMSFields( mixed $cms = null )

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

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

public
# onBeforeWrite( )

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

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

public
# onAfterWrite( )
public
# copyFrom( mixed $source, mixed $updateImageTracking = true )

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

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

public
# updateImageTracking( )
public mixed
# __get( string $field )

Allow attributes on the master page to pass through to the virtual page

Allow attributes on the master page to pass through to the virtual page

Parameters

$field
string
$field

Returns

mixed
public
# __call( string $method, string $args )

Pass unrecognized method calls on to the original data object

Pass unrecognized method calls on to the original data object

Parameters

$method
string
$method
$args
string
$args
public
# hasField( mixed $field )
public boolean
# hasMethod( string $method )

Overwrite to also check for method on the original data object

Overwrite to also check for method on the original data object

Parameters

$method
string
$method

Returns

boolean

Magic methods summary

Properties summary

public static array $icon
#
public static mixed $virtualFields
#
public static array $has_one
#
public static array $db
#

Comments

Comment policy: Please use comments for tips and corrections about the described functionality. Comments are moderated, we reserve the right to remove comments that are inappropriate or are no longer relevant.
Use the Silverstripe Forum to ask questions.
blog comments powered by Disqus
SilverStripe 2.4 API Docs API documentation generated by ApiGen 2.8.0