SilverStripe\CMS\Tests\Controllers\LeftAndMainpageIconsExtensionTest\ModuleIconC
Synopsis
class ModuleIconC
extends SiteTree
implements
TestOnly
{
- // members
- private static array $extensions = ;
- // Inherited members from SiteTree
- protected static array $_allowedChildren;
- protected $_cache_statusFlags;
- protected CacheInterface $creatableChildrenCache;
- // Inherited methods from SiteTree
- public static SiteTree|null get_by_link()
- public static array page_type_classes()
- public static string link_shortcode_handler()
- public string Link()
- public string AbsoluteLink()
- public string PreviewLink()
- public void getMimeType()
- public string RelativeLink()
- public string getAbsoluteLiveLink()
- public string CMSEditLink()
- public string ElementName()
- public bool isCurrent()
- public bool isSection()
- public bool isOrphaned()
- public string LinkOrCurrent()
- public string LinkOrSection()
- public string LinkingMode()
- public bool InSection()
- public void onBeforeDuplicate()
- public ModuleIconC duplicateWithChildren()
- public void duplicateAsChild()
- public string Breadcrumbs()
- public ArrayList getBreadcrumbItems()
- public void setParent()
- public SiteTree getParent()
- public $this setCreatableChildrenCache()
- public CacheInterface getCreatableChildrenCache()
- public string NestedTitle()
- public bool can()
- public bool canAddChildren()
- public bool canView()
- public bool canPublish()
- public bool canDelete()
- public bool canCreate()
- public bool canEdit()
- public SiteConfig getSiteConfig()
- public static PermissionChecker getPermissionChecker()
- public bool collateDescendants()
- public array MetaComponents()
- public string MetaTags()
- public $this ContentSource()
- public void requireDefaultRecords()
- protected void onBeforeWrite()
- public void syncLinkTracking()
- public void onBeforeDelete()
- public void onAfterDelete()
- public void flushCache()
- public void flushMemberCache()
- public void validate()
- public bool validURLSegment()
- public string generateURLSegment()
- public string getStageURLSegment()
- public string getLiveURLSegment()
- public array BackLinkTracking()
- public array DependentPages()
- public DataList VirtualPages()
- public FieldList getCMSFields()
- public FieldList getSettingsFields()
- public array fieldLabels()
- public FieldList getCMSActions()
- public void onAfterPublish()
- public void onAfterRevertToLive()
- protected bool isParentArchived()
- public ModuleIconC doRestoreToStage()
- public bool isNew()
- protected array getClassDropdown()
- public array allowedChildren()
- public array creatableChildren()
- public array creatableChildPages()
- public string defaultChild()
- public string defaultParent()
- public string getMenuTitle()
- public void setMenuTitle()
- public array getStatusFlags()
- public string getIconClass()
- public string getTreeTitle()
- public SiteTree Level()
- public int getPageLevel()
- public string getControllerName()
- public string CMSTreeClasses()
- public static void disableCMSFieldsExtensions()
- public static void enableCMSFieldsExtensions()
- public void providePermissions()
- public string singular_name()
- public string plural_name()
- public string getPageIconURL()
- public string|null classDescription()
- public string|null i18n_classDescription()
- public array provideI18nEntities()
- public string getParentType()
- public static void reset()
- public static void flush()
- protected void updateDependentPages()
- protected string generateChildrenCacheKey()
- protected array getExcludedURLSegments()
- public array getAnchorsOnPage()
- public bool isHomePage()
Hierarchy
Tasks
Line | Task |
---|---|
1841 | - Implement PolymorphicManyManyList to replace this |
Members
private
- $extensions
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
- $creatableChildrenCache — Psr\SimpleCache\CacheInterface
Methods
Inherited from SilverStripe\CMS\Model\SiteTree
protected
- generateChildrenCacheKey() — Cache key for creatableChildren() method
- 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}.
- getExcludedURLSegments() — Get the list of excluded root URL segments
- isParentArchived() — Determine if this page references a parent which is archived, and not available in stage
- onBeforeWrite()
- updateDependentPages() — Update dependant pages
public
- AbsoluteLink() — Get the absolute URL for this page, including protocol and host.
- BackLinkTracking() — Get the back-link tracking objects that link to this page
- Breadcrumbs() — Return a breadcrumb trail to this page. Excludes "hidden" pages (with ShowInMenus=0) by default.
- CMSEditLink() — Generates a link to edit this page in the CMS.
- 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.
- Link() — Return the link for this {@link SiteTree} object, with the {@link Director::baseURL()} included.
- 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.
- MetaComponents() — Return attributes for various meta tags, plus a title tag, in a keyed array.
- 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
- PreviewLink() — Base link used for previewing. Defaults to absolute URL, in order to account for domain changes, e.g. on multi site setups. Does not contain hints about the stage, see {@link SilverStripeNavigator} for details.
- RelativeLink() — Return the link for this {@link SiteTree} object relative to the SilverStripe root.
- 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.
- creatableChildPages() — Gets a list of the page types that can be created under this specific page, including font icons
- creatableChildren()
- 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()
- flush() — Clear the creatableChildren cache on flush
- flushCache()
- flushMemberCache() — Flushes the member specific cache for creatable children
- generateURLSegment() — Generate a URL segment based on the title provided.
- getAbsoluteLiveLink() — Get the absolute URL for this page on the Live site.
- getAnchorsOnPage()
- 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 Can be overriden by config variable
- getCreatableChildrenCache()
- getIconClass() — Returns the CSS class used for the page icon in the site tree.
- 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()
- getPageIconURL() — Generate link to this page's icon
- 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 MenuTitle, then following by a <span> indicating its publication status.
- get_by_link() — Fetches the {@link SiteTree} object that maps to a link.
- i18n_classDescription() — Get localised description for this page
- isCurrent() — Returns true if this is the currently active page being used to handle this request.
- isHomePage() — Returns whether this is the home page or not
- 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).
- link_shortcode_handler() — Replace a "[sitetree_link id=n]" shortcode with a link to the page with the corresponding ID.
- 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
- setCreatableChildrenCache()
- 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()