\CacheableSiteTree
Object-cached representation of a SilverStripe {@link SiteTree} object.
Warning: The API surface of a cacheable object differs from its SilverStripe
core counterpart. While developers have the opportunity to fine-tune what properties
and methods are cached via YML config (See README) do not rely on core methods
always being callable.
- Author: Deviate Ltd 2014-2015 http://www.deviate.net.nz
Synopsis
class CacheableSiteTree
extends CacheableData
{
- // members
- private static array $cacheable_fields = ;
- private static array $cacheable_functions = ;
- private array $Children = ;
- private CacheableSiteTree $Parent;
- private $_cached_is_section = NULL;
- // methods
- public SiteConfig getSiteConfig()
- public mixed getCachedSourceQueryParam()
- public boolean canView()
- public void addChild()
- public void removeChild()
- public void setParent()
- public CacheableData getParent()
- public array getAllChildren()
- public ArrayList getChildren()
- public string LinkOrCurrent()
- public string LinkOrSection()
- public string LinkingMode()
- public boolean isSection()
- public boolean isCurrent()
- public boolean isOrphaned()
- public string debug_simple()
- public ArrayList Menu()
- public CachedNavigation CachedNavigation()
- public string MenuTitle()
- // Inherited methods from CacheableData
- public array get_cacheable_fields()
- public array get_cacheable_functions()
- public array CachedNavigation()
- public abstract void canView()
- public boolean exists()
- public mixed extendedCan()
- public DataObject NonCachedData()
- public string Debug()
- public string debug_simple()
- public boolean hasFluent()
Hierarchy
Extends
Tasks
Line | Task |
---|---|
191 | In case of the cached object is a CachableSiteConfig object,it doesn't now has an getChildren, |
Members
private
- $Children — array
- $Parent — CacheableSiteTree
- $_cached_is_section — boolean
- $cacheable_fields — array
- $cacheable_functions — array
Methods
public
- 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()
- Menu()
- MenuTitle() — Return a MenuTitle depending on if we have the Fluent module enabled, and the current selected locale.
- addChild()
- canView()
- debug_simple()
- getAllChildren()
- getCachedSourceQueryParam()
- getChildren() — Get all child nodes of the current node and apply an optional filter. The default is to return all children using ShowInMenus=1 if no/dummy/bad filter is passed.
- getParent()
- getSiteConfig()
- isCurrent()
- isOrphaned()
- isSection()
- removeChild() — "Removes" an item from the Children array, but by default not using PHP's unset() function becuase this will cause PHP to reset its internal array pointer and we need to maintain array state. Use the $force param to unset.
- setParent()
Inherited from CacheableData
public
- Debug() — Template function for debugging. Allows you to see at-a-glance, the fields, functions and child nodes held in the Object-Cache about the current object.
- NonCachedData()
- canView()
- debug_simple()
- exists() — Returns true if this object "exists", i.e., has a sensible value.
- extendedCan()
- get_cacheable_fields()
- get_cacheable_functions()
- hasFluent() — Whether or not the Fluent extension is present and installed correctly.