Symbiote\ListingPage\ListingPage
A page that can be configured to create listings of other content
- Author: Marcus Nyeholt <marcus@silverstripe.com.au>
- License: BSD License http://silverstripe.org/bsd-license/
Synopsis
class ListingPage
extends Page
{
- // members
- private static string $table_name = 'ListingPage';
- private static array $db = ;
- private static array $has_one = ;
- private static array $defaults = ;
- private static array $listing_type_source_map = ;
- private static string $icon = 'symbiote/silverstripe-listingpage: client/images/listingpage.png';
- // methods
- public void getCMSFields()
- protected void parentType()
- protected void getSelectableFields()
- public void onBeforeWrite()
- protected DataObject getListingSource()
- protected string effectiveSourceType()
- public SS_List ComponentListingItems()
- public SS_List ListingItems()
- protected void getIdsFrom()
- public void Content()
Hierarchy
Extends
- Page
Members
private
- $db
- $defaults
- $has_one
- $icon
- $listing_type_source_map
—
array
A mapping between ListType selected and the type of items that should be shown in the "Source" selection tree. If not specified in this mapping, it is assumed to be 'Page'. - $table_name
Methods
protected
- effectiveSourceType() — Sometimes the type of a listing source will be different from that of the item being listed (eg a news article might be beneath a news holder instead of another news article) so we need to figure out what that is based on the settings for this page.
- getIdsFrom() — Recursively find all the child items that need to be listed
- getListingSource() — Some subclasses will want to override this.
- getSelectableFields()
- parentType()
public
- ComponentListingItems() — Retrieves all the component/relation listing items
- Content()
- ListingItems() — Retrieves all the listing items within this source
- getCMSFields()
- onBeforeWrite() — When saving, check to see whether we should delete the listing source ID