\SilverStripeContentSource
An example external content connector that lists content from the filesystem
Please note: Set a base_path variable to prevent users entering any
arbitrary path!
- Author: Marcus Nyeholt <marcus@silverstripe.com.au>
- License: BSD License (http://silverstripe.org/BSD-license
Synopsis
class SilverStripeContentSource
extends ExternalContentSource
implements
ExternalContentRepositoryProvider
{
- // members
- private static array $db = ;
- private static array $icon = ;
- private static array $class_item_map = ;
- protected SilverStripeClient $repo;
- protected array $objectCache = ;
- // methods
- public void getCMSFields()
- public SilverStripeClient getRemoteRepository()
- public void getContentImporter()
- public void allowedImportTargets()
- public void onBeforeWrite()
- public DataObject getObject()
- public void getRoot()
- public void stageChildren()
- public string encodeId()
- public String decodeId()
Hierarchy
Extends
- ExternalContentSource
Implements
- ExternalContentRepositoryProvider
Members
private
- $class_item_map
- $db
- $icon
protected
- $objectCache
—
array
A cache for objects - $repo
—
SilverStripeClient
The silverstripe client to use
Methods
public
- allowedImportTargets() — Matrix content can only be imported into the sitetree for now.
- decodeId() — Decode an ID encoded by the above encodeId method
- encodeId() — Helper function to encode a remote ID that is safe to use within silverstripe
- getCMSFields()
- getContentImporter() — Return a new matrix content importer
- getObject() — Get the object represented by ID
- getRemoteRepository() — Get the SilverStripeClient e(non-PHPdoc)
- getRoot()
- onBeforeWrite() — Whenever we save the content source, we want to disconnect the repository so that it reconnects with whatever new connection details are provided
- stageChildren()