AndrewHaine\SiteTreeInheritanceHelpers\Extensions\SiteTreeExtension
Adds functionality to search 'up' the sitetree for a desired value or relation
Synopsis
class SiteTreeExtension
extends Extension
{
- // methods
- public mixed|false getInheritedDBValue()
- public mixed|false getInheritedRelationValue()
- private static mixed check_relation_method()
- private static mixed check_list_method()
- private SiteTree get_homepage()
Hierarchy
Extends
- SilverStripe\Core\Extension
Methods
private
- check_list_method() — Check that a method which should return a list exists and that the result is valid
- check_relation_method() — Check that a related object is present on the current page and that said object exists - use this for single object relations
- get_homepage() — Returns the homepage - will usually return the page with the URLSegment 'home'
public
- getInheritedDBValue() — Method to inherit a DB field from the parents
- getInheritedRelationValue() — Method to inherit a relation from the parent - use this for has_one, has_many or many_many