class VirtualPage extends Page

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

Properties

static $virtualFields
int $CopyContentFromID

Methods

array
getVirtualFields()

Generates the array of fields required for the page type.

array
getNonVirtualisedFields()

List of fields or properties to never virtualise

setCopyContentFromID($val)

No description

ContentSource()

No description

string
MetaTags(boolean $includeTitle = true)

For VirtualPage, add a canonical link tag linking to the original page See TRAC #6828 & http://support.google.com/webmasters/bin/answer.py?hl=en&answer=139394

allowedChildren()

No description

syncLinkTracking()

No description

bool
canPublish(Member $member = null)

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

isPublishable()

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

getCMSFields()

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

onBeforeWrite()

No description

getSettingsFields()

No description

validate()

No description

updateImageTracking() deprecated

No description

CMSTreeClasses()

No description

array
getViewerTemplates(string $suffix = '')

Use the target page's class name for fetching templates - as we need to take on its appearance

mixed
__get(string $field)

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

getField($field)

No description

bool
isFieldVirtualised(string $field)

Check if given field is virtualised

mixed
__call(string $method, array $args)

Pass unrecognized method calls on to the original data object

bool
hasField(string $field)

No description

string
castingHelper(string $field)

Return the "casting helper" (a piece of PHP code that when evaluated creates a casted value object) for a field on this object.

allMethodNames($custom = false)

{@inheritdoc}

getControllerName()

{@inheritdoc}

SiteTree
CopyContentFrom()

No description

Details

at line 90
array getVirtualFields()

Generates the array of fields required for the page type.

Return Value

array

at line 109
array getNonVirtualisedFields()

List of fields or properties to never virtualise

Return Value

array

at line 118
setCopyContentFromID($val)

Parameters

$val

at line 127
ContentSource()

at line 143
string MetaTags(boolean $includeTitle = true)

For VirtualPage, add a canonical link tag linking to the original page See TRAC #6828 & http://support.google.com/webmasters/bin/answer.py?hl=en&answer=139394

Parameters

boolean $includeTitle Show default -tag, set to false for custom templating</td> </tr> </table> <h4>Return Value</h4> <table class="table table-condensed"> <tr> <td>string</td> <td>The XHTML metatags</td> </tr> </table> </div> </div> </div> <div class="method-item"> <h3 id="method_allowedChildren"> <div class="location">at line 157</div> <code> <strong>allowedChildren</strong>() </code> </h3> <div class="details"> <div class="tags"> </div> </div> </div> <div class="method-item"> <h3 id="method_syncLinkTracking"> <div class="location">at line 166</div> <code> <strong>syncLinkTracking</strong>() </code> </h3> <div class="details"> <div class="tags"> </div> </div> </div> <div class="method-item"> <h3 id="method_canPublish"> <div class="location">at line 183</div> <code> bool <strong>canPublish</strong>(<a href='/master/silverstripe/security/member'><abbr title="SilverStripe\Security\Member">Member</abbr></a> $member = null) </code> </h3> <div class="details"> <div class="method-description"> <p>We can only publish the page if there is a published source page</p> </div> <div class="tags"> <h4>Parameters</h4> <table class="table table-condensed"> <tr> <td><a href='/master/silverstripe/security/member'><abbr title="SilverStripe\Security\Member">Member</abbr></a></td> <td>$member</td> <td>Member to check</td> </tr> </table> <h4>Return Value</h4> <table class="table table-condensed"> <tr> <td>bool</td> <td></td> </tr> </table> </div> </div> </div> <div class="method-item"> <h3 id="method_isPublishable"> <div class="location">at line 194</div> <code> <strong>isPublishable</strong>() </code> </h3> <div class="details"> <div class="method-description"> <p>Returns true if is page is publishable by anyone at all Return false if the source page isn't published yet.</p> <p>Note that isPublishable doesn't affect ete from live, only publish.</p> </div> <div class="tags"> </div> </div> </div> <div class="method-item"> <h3 id="method_getCMSFields"> <div class="location">at line 217</div> <code> <strong>getCMSFields</strong>() </code> </h3> <div class="details"> <div class="method-description"> <p>Generate the CMS fields from the fields from the original page.</p> </div> <div class="tags"> </div> </div> </div> <div class="method-item"> <h3 id="method_onBeforeWrite"> <div class="location">at line 289</div> <code> <strong>onBeforeWrite</strong>() </code> </h3> <div class="details"> <div class="tags"> </div> </div> </div> <div class="method-item"> <h3 id="method_getSettingsFields"> <div class="location">at line 320</div> <code> <strong>getSettingsFields</strong>() </code> </h3> <div class="details"> <div class="tags"> </div> </div> </div> <div class="method-item"> <h3 id="method_validate"> <div class="location">at line 342</div> <code> <strong>validate</strong>() </code> </h3> <div class="details"> <div class="tags"> </div> </div> </div> <div class="method-item"> <h3 id="method_updateImageTracking"> <div class="location">at line 366</div> <code> <strong>updateImageTracking</strong>() <small><sup><span class="label label-danger">deprecated</span></sup></small></code> </h3> <div class="details"> <p> <small><sup><span class="label label-danger">deprecated</span></sup></small> <tr> <td>4.2..5.0</td> <td></td> </tr> </p> <div class="tags"> </div> </div> </div> <div class="method-item"> <h3 id="method_CMSTreeClasses"> <div class="location">at line 387</div> <code> <strong>CMSTreeClasses</strong>() </code> </h3> <div class="details"> <div class="tags"> </div> </div> </div> <div class="method-item"> <h3 id="method_getViewerTemplates"> <div class="location">at line 402</div> <code> array <strong>getViewerTemplates</strong>(string $suffix = '') </code> </h3> <div class="details"> <div class="method-description"> <p>Use the target page's class name for fetching templates - as we need to take on its appearance</p> </div> <div class="tags"> <h4>Parameters</h4> <table class="table table-condensed"> <tr> <td>string</td> <td>$suffix</td> <td></td> </tr> </table> <h4>Return Value</h4> <table class="table table-condensed"> <tr> <td>array</td> <td></td> </tr> </table> </div> </div> </div> <div class="method-item"> <h3 id="method___get"> <div class="location">at line 419</div> <code> mixed <strong>__get</strong>(string $field) </code> </h3> <div class="details"> <div class="method-description"> <p>Allow attributes on the master page to pass through to the virtual page</p> </div> <div class="tags"> <h4>Parameters</h4> <table class="table table-condensed"> <tr> <td>string</td> <td>$field</td> <td></td> </tr> </table> <h4>Return Value</h4> <table class="table table-condensed"> <tr> <td>mixed</td> <td></td> </tr> </table> </div> </div> </div> <div class="method-item"> <h3 id="method_getField"> <div class="location">at line 433</div> <code> <strong>getField</strong>($field) </code> </h3> <div class="details"> <div class="tags"> <h4>Parameters</h4> <table class="table table-condensed"> <tr> <td></td> <td>$field</td> <td></td> </tr> </table> </div> </div> </div> <div class="method-item"> <h3 id="method_isFieldVirtualised"> <div class="location">at line 447</div> <code> bool <strong>isFieldVirtualised</strong>(string $field) </code> </h3> <div class="details"> <div class="method-description"> <p>Check if given field is virtualised</p> </div> <div class="tags"> <h4>Parameters</h4> <table class="table table-condensed"> <tr> <td>string</td> <td>$field</td> <td></td> </tr> </table> <h4>Return Value</h4> <table class="table table-condensed"> <tr> <td>bool</td> <td></td> </tr> </table> </div> </div> </div> <div class="method-item"> <h3 id="method___call"> <div class="location">at line 472</div> <code> mixed <strong>__call</strong>(string $method, array $args) </code> </h3> <div class="details"> <div class="method-description"> <p>Pass unrecognized method calls on to the original data object</p> </div> <div class="tags"> <h4>Parameters</h4> <table class="table table-condensed"> <tr> <td>string</td> <td>$method</td> <td></td> </tr> <tr> <td>array</td> <td>$args</td> <td></td> </tr> </table> <h4>Return Value</h4> <table class="table table-condensed"> <tr> <td>mixed</td> <td></td> </tr> </table> </div> </div> </div> <div class="method-item"> <h3 id="method_hasField"> <div class="location">at line 485</div> <code> bool <strong>hasField</strong>(string $field) </code> </h3> <div class="details"> <div class="tags"> <h4>Parameters</h4> <table class="table table-condensed"> <tr> <td>string</td> <td>$field</td> <td></td> </tr> </table> <h4>Return Value</h4> <table class="table table-condensed"> <tr> <td>bool</td> <td></td> </tr> </table> </div> </div> </div> <div class="method-item"> <h3 id="method_castingHelper"> <div class="location">at line 501</div> <code> string <strong>castingHelper</strong>(string $field) </code> </h3> <div class="details"> <div class="method-description"> <p>Return the "casting helper" (a piece of PHP code that when evaluated creates a casted value object) for a field on this object.</p> </div> <div class="tags"> <h4>Parameters</h4> <table class="table table-condensed"> <tr> <td>string</td> <td>$field</td> <td></td> </tr> </table> <h4>Return Value</h4> <table class="table table-condensed"> <tr> <td>string</td> <td></td> </tr> </table> </div> </div> </div> <div class="method-item"> <h3 id="method_allMethodNames"> <div class="location">at line 513</div> <code> <strong>allMethodNames</strong>($custom = false) </code> </h3> <div class="details"> <div class="method-description"> <p>{@inheritdoc}</p> </div> <div class="tags"> <h4>Parameters</h4> <table class="table table-condensed"> <tr> <td></td> <td>$custom</td> <td></td> </tr> </table> </div> </div> </div> <div class="method-item"> <h3 id="method_getControllerName"> <div class="location">at line 527</div> <code> <strong>getControllerName</strong>() </code> </h3> <div class="details"> <div class="method-description"> <p>{@inheritdoc}</p> </div> <div class="tags"> </div> </div> </div> <div class="method-item"> <h3 id="method_CopyContentFrom"> <div class="location">at line 28</div> <code> SiteTree <strong>CopyContentFrom</strong>() </code> </h3> <div class="details"> <div class="tags"> <h4>Return Value</h4> <table class="table table-condensed"> <tr> <td>SiteTree</td> <td></td> </tr> </table> </div> </div> </div> </div> </div> <div id="footer"> Generated by <a href="http://sami.sensiolabs.org/">Sami, the API Documentation Generator</a>. </div> </div> </div> <script src="../../../js/bootstrap.min.js"></script> <script src="../../../js/typeahead.min.js"></script> <script src="../../../sami.js"></script> </body> </html>