\StaticSiteContentSource
Define the overarching content-sources, schemas etc.
- Author: Sam Minee <sam@silverstripe.com>
Synopsis
class StaticSiteContentSource
extends ExternalContentSource
{
- // members
- private static array $db = ;
- private static array $has_many = ;
- public static array $export_columns = ;
- public $absoluteURL = NULL;
- public $staticSiteCacheDir = NULL;
- protected StaticSiteUtils $utils;
- // methods
- public void __construct()
- public FieldList getCMSFields()
- public void onAfterWrite()
- public StaticSiteUrlList urlList()
- public StaticSiteCrawler crawl()
- public mixed getSchemaForURL()
- public boolean schemaCanParseURL()
- public StaticSiteContentItem getObject()
- public StaticSiteContentItem getRoot()
- public array allowedImportTargets()
- public ArrayList stageChildren()
- public StaticSiteImporter getContentImporter()
- public boolean isValid()
- public boolean canImport()
- public boolean canCreate()
Hierarchy
Extends
- ExternalContentSource
Tasks
Line | Task |
---|---|
155 | use customise() and arrange this using an includes .ss template fragment |
Members
private
- $db — array
- $has_many — array
protected
- $utils
—
StaticSiteUtils
Holds the StaticSiteUtils object on construct
public
- $absoluteURL — string
- $export_columns — array
- $staticSiteCacheDir
—
string
Where do we store our items for caching? Also used by calling logic
Methods
public
- __construct()
- allowedImportTargets() — Signals external-content module that we wish to operate on `SiteTree` and `File` objects.
- canCreate()
- canImport()
- crawl() — Crawl the target site
- getCMSFields()
- getContentImporter()
- getObject() — Returns a StaticSiteContentItem for the given URL Relative URLs are used as the unique identifiers by this importer
- getRoot()
- getSchemaForURL() — Fetch an appropriate schema for a given URL and/or Mime-Type.
- isValid()
- onAfterWrite() — If the site has been crawled and then subsequently the URLProcessor was changed, we need to ensure URLs are re-processed using the newly selected URL Preprocessor
- schemaCanParseURL() — Performs a match on the Schema->AppliedTo field with reference to the URL of the current iteration within getSchemaForURL().
- stageChildren() — Return the root node.
- urlList()