\DatedUpdateHolder
An abstract base class for {@link NewsHolder} pages.
This code is forked from https://gitlab.cwp.govt.nz/cwp/cwp (16/Jul/2014)
This class provides the rss and filtering features for displaying pages by month, year and taxonomy tag.
Requires the taxonomy module, note the var $taxonomy_join_table which must match your many_many array key for
the relationship in the base page where your taxonomy is setup, e.g. if you did that in Page.php and had:
private static $many_many = array(
'Tags' => 'TaxonomyTerm'
);
then you'd need $taxonomy_join_table = 'Page_Tags'; as that's the join table name between Page and Tags, yo.
- Author: scienceninjas@silverstripe.com
- License: BSD License (http://silverstripe.org/bsd-license/)
Synopsis
class DatedUpdateHolder
extends Page
{
- // members
- private static $hide_ancestor $hide_ancestor = 'DatedUpdateHolder';
- private static $update_name $update_name = 'Updates';
- private static $update_class $update_class = 'DatedUpdatePage';
- private static $taxonomy_join_table $taxonomy_join_table = 'Page_Tags';
- // methods
- public DataList UpdateTags()
- public DataList Updates()
- public static DataList AllUpdates()
- public static ArrayList ExtractMonths()
- public string getDefaultRSSLink()
- public string getSubscriptionTitle()
Hierarchy
Extends
- Page
Members
private
- $hide_ancestor — $hide_ancestor
- $taxonomy_join_table — $taxonomy_join_table
- $update_class — $update_class
- $update_name — $update_name
Methods
public
- AllUpdates() — Find all the sites updates, based on some filters.
- ExtractMonths() — Produce an ArrayList of available months out of the updates contained in the DataList.
- UpdateTags() — Find all distinct tags (TaxonomyTerms) associated with the DatedUpdatePages under this holder.
- Updates() — Wrapper to find all updates belonging to this holder, based on some filters.
- getDefaultRSSLink()
- getSubscriptionTitle()