SilverStripe\CMS\Tests\Model\SiteTreeTest_StageStatusInherit

Synopsis

class SiteTreeTest_StageStatusInherit extends SiteTree implements TestOnly {
  • // members
  • private static string $table_name = 'SiteTreeTest_StageStatusInherit';
}

Hierarchy

Extends

Implements

  • SilverStripe\Dev\TestOnly

Tasks

Line Task
1304+ Move <title> tag in separate getter for easier customization and more obvious usage

Members

private

  • $table_name

protected

  • $_allowedChildren — array
    Used as a cache for `self::allowedChildren()` Drastically reduces admin page load when there are a lot of page types
  • $_cache_statusFlags

Methods

public

Inherited from SilverStripe\CMS\Model\SiteTree

protected

  • getClassDropdown() — Get the class dropdown used in the CMS to change the class of a page. This returns the list of options in the dropdown as a Map from class name to singular name. Filters by {@link SiteTree->canCreate()}, as well as {@link SiteTree::$needs_permission}.
  • isParentArchived() — Determine if this page references a parent which is archived, and not available in stage
  • onBeforeWrite()
  • updateDependentPages() — Update dependant pages

public

  • CMSTreeClasses() — Return the CSS classes to apply to this node in the CMS tree.
  • ContentSource() — Returns the object that contains the content that a user would associate with this page.
  • DependentPages() — Returns the pages that depend on this page. This includes virtual pages, pages that link to it, etc.
  • ElementName() — Return a CSS identifier generated from this page's link.
  • InSection() — Check if this page is in the given current section.
  • Level() — 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.
  • LinkOrCurrent() — Return "link" or "current" depending on if this is the {@link SiteTree::isCurrent()} current page.
  • LinkOrSection() — Return "link" or "section" depending on if this is the {@link SiteTree::isSeciton()} current section.
  • LinkingMode() — Return "link", "current" or "section" depending on if this page is the current page, or not on the current page but in the current section.
  • MetaTags() — Return the title, description, keywords and language metatags.
  • NestedTitle() — Return a string of the form "parent - page" or "grandparent - parent - page" using page titles
  • VirtualPages() — Return all virtual pages that link to this page.
  • allowedChildren() — Returns an array of the class names of classes that are allowed to be children of this class.
  • can() — This function should return true if the current user can execute this action. It can be overloaded to customise the security model for an application.
  • canAddChildren() — 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.
  • canCreate() — This function should return true if the current user can create new pages of this class, regardless of class. It can be overloaded to customise the security model for an application.
  • canDelete() — 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.
  • canEdit() — 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.
  • canPublish() — Check if this page can be published
  • canView() — 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.
  • classDescription() — Get description for this page type
  • collateDescendants() — Collate selected descendants of this page.
  • defaultChild() — Returns the class name of the default class for children of this page.
  • defaultParent() — Returns the class name of the default class for the parent of this page.
  • disableCMSFieldsExtensions() — Stops extendCMSFields() being called on getCMSFields(). This is useful when you need access to fields added by subclasses of SiteTree in a extension. Call before calling parent::getCMSFields(), and reenable afterwards.
  • doRestoreToStage() — Restore the content in the active copy of this SiteTree page to the stage site.
  • duplicateAsChild() — Duplicate this node and its children as a child of the node with the given ID
  • duplicateWithChildren() — Duplicates each child of this node recursively and returns the top-level duplicate node.
  • enableCMSFieldsExtensions() — Reenables extendCMSFields() being called on getCMSFields() after it has been disabled by disableCMSFieldsExtensions().
  • fieldLabels()
  • flushCache()
  • generateURLSegment() — Generate a URL segment based on the title provided.
  • getBreadcrumbItems() — Returns a list of breadcrumbs for the current page.
  • getCMSActions() — Get the actions available in the CMS for this page - eg Save, Publish.
  • getCMSFields() — Returns a FieldList with which to create the main editing form.
  • getControllerName() — Find the controller name by our convention of {$ModelClass}Controller
  • getLiveURLSegment() — Gets the URL segment for the currently published version of this page.
  • getMenuTitle() — 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.
  • getMimeType()
  • getPageLevel() — Gets the depth of this page in the sitetree, where 1 is the root level
  • getParent() — Get the parent of this page.
  • getParentType() — Returns 'root' if the current page has no parent, or 'subpage' otherwise
  • getPermissionChecker()
  • getSettingsFields() — Returns fields related to configuration aspects on this record, e.g. access control. See {@link getCMSFields()} for content-related fields.
  • getSiteConfig() — Stub method to get the site config, unless the current class can provide an alternate.
  • getStageURLSegment() — Gets the URL segment for the latest draft version of this page.
  • getStatusFlags() — A flag provides the user with additional data about the current page status, for example a "removed from draft" status. Each page can have more than one status flag. Returns a map of a unique key to a (localized) title for the flag. The unique key can be reused as a CSS class. Use the 'updateStatusFlags' extension point to customize the flags.
  • getTreeTitle() — getTreeTitle will return three <span> html DOM elements, an empty <span> with the class 'jstree-pageicon' in front, following by a <span> wrapping around its MenutTitle, then following by a <span> indicating its publication status.
  • i18n_classDescription() — Get localised description for this page
  • isCurrent() — Returns true if this is the currently active page being used to handle this request.
  • isNew() — Check if this page is new - that is, if it has yet to have been written to the database.
  • isOrphaned() — Check if the parent of this page has been removed (or made otherwise unavailable), and is still referenced by this child. Any such orphaned page may still require access via the CMS, but should not be shown as accessible to external users.
  • isSection() — Check if this page is in the currently active section (e.g. it is either current or one of its children is currently being viewed).
  • onAfterDelete()
  • onAfterPublish()
  • onAfterRevertToLive() — Update draft dependant pages
  • onBeforeDelete()
  • onBeforeDuplicate() — Reset Sort on duped page
  • page_type_classes() — Return a subclass map of SiteTree that shouldn't be hidden through {@link SiteTree::$hide_ancestor}
  • plural_name() — Default plural name for page / sitetree
  • provideI18nEntities() — Overloaded to also provide entities for 'Page' class which is usually located in custom code, hence textcollector picks it up for the wrong folder.
  • providePermissions()
  • requireDefaultRecords() — Add default records to database.
  • reset() — Clear the permissions cache for SiteTree
  • setMenuTitle() — Set the menu title for this page.
  • setParent() — Make this page a child of another page.
  • singular_name() — Default singular name for page / sitetree
  • syncLinkTracking() — Trigger synchronisation of link tracking
  • validURLSegment() — Returns true if this object has a URLSegment value that does not conflict with any other objects. This method checks for: - A page with the same URLSegment that has a conflict - Conflicts with actions on the parent page - A conflict caused by a root page having the same URLSegment as a class name
  • validate()