Comments: on this page. Click to read or post your own.
Basic data-object representing all pages within the site tree.
This data-object takes care of the heirachy. All page types that live within the heirachy should inherit from this.
In addition, it contains a number of static methods for querying the site tree.
Located in /sapphire/core/model/SiteTree.php (line 10)
Object | --ViewableData | --DataObject | --SiteTree
| Class | Description |
|---|---|
| GhostPage | Ghost pages are placeholder pages that are used to facilitate the apparent support for multiple parents. |
The text shown in the create page dropdown. If this is not set, default to "Create a ClassName".
Indicates what kind of children this page type can have.
This can be an array of allowed child classes, or the string "none" - indicating that this page type can't have children. If a classname is prefixed by "*", such as "*Page", then only that class is allowed - no subclasses. Otherwise, the class and all its subclasses are allowed.
Delimit breadcrumb-links generated by BreadCrumbs()
Controls whether a page can be in the root of the site tree.
If this is false, the class cannot be created in the CMS.
An array of this pages URL segment and it's parents.
This is generated by prepareCurrentAndSection for use by isCurrent() and isSection()
The default child class for this page.
The default parent class for this page.
If you extend a class, and don't want to be able to select the old class in the cms, set this to the old class name. Eg, if you extended Product to make ImprovedProduct, then you would set $hide_ancestor to Product.
Icon to use in the CMS
This should be the base filename. The suffixes -file.gif, -openfolder.gif and -closedfolder.gif will be appended to the base name that you provide there. If you prefer, you can pass an array: array("jsparty\tree\images\page", $option). $option can be either "file" or "folder" to force the icon to always be a file or folder, regardless of whether the page has children or not
List of permission codes a user can have to allow a user to create a page of this type.
Inherited from DataObject
DataObject::$ancestry
DataObject::$api_access
DataObject::$brokenOnDelete
DataObject::$brokenOnWrite
DataObject::$cache_get_one
DataObject::$changed
DataObject::$componentCache
DataObject::$components
DataObject::$default_records
DataObject::$destroyed
DataObject::$field_labels
DataObject::$original
DataObject::$plural_name
DataObject::$record
DataObject::$singular_name
DataObject::$summary_fields
Inherited from ViewableData
ViewableData::$castingHelperPair_cache
ViewableData::$customisedObj
ViewableData::$failover
ViewableData::$iteratorPos
ViewableData::$iteratorTotalItems
ViewableData::$namedAs
ViewableData::$parent
ViewableData::$_natural_cache
ViewableData::$_object_cache
ViewableData::$_xml_cache
Inherited from Object
Object::$builtInMethods
Object::$class
Object::$classConstructed
Object::$extension_instances
Object::$extraMethods
Object::$extraStatics
Object::$statics
Object::$static_cached
Get the absolute URL for this page by stage
Returns an array of the class names of classes that are allowed to be children of this class.
Return a breadcrumb trail to this page. Excludes "hidden" pages (with ShowInMenus=0).
This function should return true if the current user can add children to this page.
It can be overloaded to customise the security model for an application.
Returns true if the member is allowed to do the given action.
This function should return true if the current user can add children to this page.
It can be overloaded to customise the security model for an application.
This function should return true if the current user can create new pages of this class.
It can be overloaded to customise the security model for an application.
This function should return true if the current user can delete this page.
It can be overloaded to customise the security model for an application.
This function should return true if the current user can edit this page.
It can be overloaded to customise the security model for an application.
This function should return true if the current user can publish this page.
It can be overloaded to customise the security model for an application.
This function should return true if the current user can view this page.
It can be overloaded to customise the security model for an application.
Function to clean up the currently loaded page after a reorganise has been called. It should return a piece of JavaScript to be executed on the client side, to clean up the results of the reorganise.
Return the CSS classes to apply to this node in the CMS tree
Collate selected descendants of this page.
$condition will be evaluated on each descendant, and if it is succeeds, that item will be added to the $collator array.
Returns comments on this page. This will only show comments that have been marked as spam if "?showspam=1" is appended to the URL.
Returns the object that contains the content that a user would associate with this page.
Ordinarily, this is just the page itself, but for example on RedirectorPages or VirtualPages ContentSource() will return the page that is linked to.
Returns the class name of the default class for children of this page.
Returns the class name of the default class for the parent of this page.
Publish this page
Revert the draft changes: replace the draft content with the content on live
Roll the draft version of this page to match the published page
Unpublish this page - remove it from the live site
Create a duplicate of this node. Doesn't affect joined data - create a custom overloading of this if you need such behaviour.
Duplicate this node and its children as a child of the node with the given ID
Duplicates each child of this node recursively and returns the duplicate node.
Get the URL segment for this page, eg 'home'
Generate a URL segment based on the title provided.
Get the class dropdown used in the CMS to change the class of a page.
This returns the list of options in the drop as a Map from class name to text in dropdown.
Get the actions available in the CMS for this page - eg Save, Publish.
Returns a FieldSet with which to create the CMS editing form.
You can override this in your child classes to add extra fields - first get the parent fields using parent::getCMSFields(), then use addFieldToTab() on the FieldSet.
Get the title for use in menus for this page. If the MenuTitle field is set it returns that, else it returns the Title field.
The default value of the priority field depends on the depth of the page in the site tree, so it must be calculated dynamically.
Check if this page is in the given current section.
Check if this is the currently viewed page.
Check if this page is new - that is, if it has yet to have been written to the database.
Check if this page has been published.
Check if the currently viewed page is in this section.
Returns the page in the current page stack of the given level.
Level(1) will return the main menu item that we're currently inside, etc.
Get the URL for this page.
Returns link/current/section, depending if you're not in the current section, you're on the current page, or you're in the current section but not on the current page.
Returns link/current, depending on whether you're on the current page.
This is useful for css styling of menus.
Returns link/section, depending on whether you're on the current section.
This is useful for css styling of menus.
Return the title, description, keywords and language metatags.
Look for ghost parents
Return a string of the form "parent - page" or "grandparent - parent - page".
This function is used for isCurrent() and isSection() to prepare the cached answers.
Add default records to database.
This function is called whenever the database is built, after the database tables have all been created. Overload this to add default records when the database is built, but make sure you call parent::requireDefaultRecords().
Replace a URL in html content with a new URL.
Set the menu title for this page.
Make this page a child of another page.
If the parent page does not exist, resolve it to a valid ID before updating this page's reference.
TitleWithStatus will return the title in an <ins>, <del> or <span class=\"modified\"> tag depending on its publication status.
Inherited From DataObject
DataObject::__construct()
DataObject::baseTable()
DataObject::buildDataObjectSet()
DataObject::buildSQL()
DataObject::can()
DataObject::canCreate()
DataObject::canDelete()
DataObject::canEdit()
DataObject::canView()
DataObject::castedUpdate()
DataObject::context_obj()
DataObject::createComponent()
DataObject::customDatabaseFields()
DataObject::data()
DataObject::databaseFields()
DataObject::databaseIndexes()
DataObject::db()
DataObject::dbObject()
DataObject::debug()
DataObject::defaultSearchFilters()
DataObject::defineMethods()
DataObject::delete()
DataObject::delete_by_id()
DataObject::destroy()
DataObject::disable_subclass_access()
DataObject::duplicate()
DataObject::enable_subclass_access()
DataObject::exists()
DataObject::extendedSQL()
DataObject::fieldExists()
DataObject::fieldLabel()
DataObject::fieldLabels()
DataObject::filledOut()
DataObject::flushCache()
DataObject::forceChange()
DataObject::get()
DataObject::getAllFields()
DataObject::getChangedFields()
DataObject::getClassAncestry()
DataObject::getCMSFields()
DataObject::getComponent()
DataObject::getComponentJoinField()
DataObject::getComponents()
DataObject::getComponentsQuery()
DataObject::getDefaultSearchContext()
DataObject::getField()
DataObject::getFrontEndFields()
DataObject::getManyManyComponents()
DataObject::getManyManyComponentsQuery()
DataObject::getManyManyFilter()
DataObject::getManyManyJoin()
DataObject::getReverseAssociation()
DataObject::getTitle()
DataObject::get_by_id()
DataObject::get_by_url()
DataObject::get_one()
DataObject::hasDatabaseField()
DataObject::hasField()
DataObject::hasOwnTableDatabaseField()
DataObject::has_many()
DataObject::has_one()
DataObject::i18n_plural_name()
DataObject::i18n_singular_name()
DataObject::inheritedDatabaseFields()
DataObject::instance_get()
DataObject::instance_get_one()
DataObject::isEmpty()
DataObject::isInDB()
DataObject::listOfFields()
DataObject::many_many()
DataObject::merge()
DataObject::newClassInstance()
DataObject::onAfterWrite()
DataObject::onBeforeDelete()
DataObject::onBeforeWrite()
DataObject::plural_name()
DataObject::populateDefaults()
DataObject::relObject()
DataObject::requireDefaultRecords()
DataObject::requireTable()
DataObject::scaffoldFormFields()
DataObject::scaffoldSearchFields()
DataObject::searchableFields()
DataObject::setCastedField()
DataObject::setClassName()
DataObject::setComponent()
DataObject::setField()
DataObject::set_context_obj()
DataObject::singular_name()
DataObject::summaryFields()
DataObject::toMap()
DataObject::update()
DataObject::validate()
DataObject::write()
DataObject::writeComponents()
DataObject::writeWithoutVersion()
Inherited From ViewableData
ViewableData::ATT_val()
ViewableData::BaseHref()
ViewableData::buildCastingHelperCache()
ViewableData::cachedCall()
ViewableData::castingHelper()
ViewableData::castingHelperPair()
ViewableData::castingObjectCreator()
ViewableData::castingObjectCreatorPair()
ViewableData::CSSClasses()
ViewableData::CurrentMember()
ViewableData::CurrentPage()
ViewableData::customise()
ViewableData::Debug()
ViewableData::defineMethods()
ViewableData::escapeTypeForField()
ViewableData::Even()
ViewableData::EvenOdd()
ViewableData::First()
ViewableData::FirstLast()
ViewableData::getField()
ViewableData::getIterator()
ViewableData::getXMLValues()
ViewableData::hasField()
ViewableData::HasPerm()
ViewableData::hasValue()
ViewableData::i18nLocale()
ViewableData::IsAjax()
ViewableData::iteratorProperties()
ViewableData::JS_val()
ViewableData::Last()
ViewableData::Me()
ViewableData::Middle()
ViewableData::MiddleString()
ViewableData::obj()
ViewableData::Odd()
ViewableData::Pos()
ViewableData::RAW_val()
ViewableData::renderWith()
ViewableData::SecurityID()
ViewableData::setCustomisedObj()
ViewableData::setField()
ViewableData::SQL_val()
ViewableData::ThemeDir()
ViewableData::Top()
ViewableData::TotalItems()
ViewableData::val()
ViewableData::XML_val()
ViewableData::__get()
ViewableData::__isset()
ViewableData::__set()
Inherited From Object
Object::__construct()
Object::addMethodsFrom()
Object::addStaticVars()
Object::addWrapperMethod()
Object::add_extension()
Object::allMethodNames()
Object::buildMethodList()
Object::cacheToFile()
Object::cacheToFileWithArgs()
Object::create()
Object::createMethod()
Object::defineMethods()
Object::exists()
Object::extend()
Object::extInstance()
Object::getCustomClass()
Object::hasExtension()
Object::hasMethod()
Object::invokeWithExtensions()
Object::is_a()
Object::loadCache()
Object::parentClass()
Object::sanitiseCachename()
Object::saveCache()
Object::set_stat()
Object::set_uninherited()
Object::stat()
Object::strong_create()
Object::uninherited()
Object::useCustomClass()
Object::__call()
Object::__toString()
Documentation generated on Sun, 19 Oct 2008 06:46:07 +1300 by phpDocumentor 1.3.2