Symbiote\UserTemplates\TemplatedElementExtension
Allows an element to have a custom rendering template assigned to it from within the CMS.
Second, the element may be templated from a 'creation' standpoint; that is,
if it has a particular "child elements" property set, during its onaftercreate
it will create any indicated templated elements.
- Author: Stephen McMahon <stephen@symbiote.com.au>
Synopsis
class TemplatedElementExtension
extends DataExtension
{
- // methods
- public void onBeforeWrite()
- public void updateCMSFields()
- public void getElementTemplateList()
- protected void fileBasedTemplates()
- public void onAfterWrite()
- public void createTemplatedElements()
- protected type createElement()
Hierarchy
Extends
- SilverStripe\ORM\DataExtension
Members
private
- $db
- $has_one
Methods
protected
- createElement() — Creates a single element from the given configuration data, basically a key => value map of properties.
- fileBasedTemplates()
public
- createTemplatedElements() — Creates a set of elements as items in a given list
- getElementTemplateList()
- onAfterWrite()
- onBeforeWrite()
- updateCMSFields()