SilverStripe\TagManager\SnippetProvider
Code that can provide snippets for the tag manager should implement this interface.
Snippets may have user-provided parameters that are used to generate the snippet.
These can be configured and enabled in the admin/tagmanager UI.
Synopsis
interface SnippetProvider
{
- // constants
- const ZONE_HEAD_START = 'start-head';
- const ZONE_HEAD_END = 'end-head';
- const ZONE_BODY_START = 'start-body';
- const ZONE_BODY_END = 'end-body';
- // methods
- public void getTitle()
- public void getSummary()
- public FieldList getParamFields()
- public A getSnippets()
Constants
Name | Value |
---|---|
ZONE_HEAD_START | 'start-head' |
ZONE_HEAD_END | 'end-head' |
ZONE_BODY_START | 'start-body' |
ZONE_BODY_END | 'end-body' |
Methods
public
- getParamFields() — Return a list of fields for configuring this snippet.
- getSnippets() — Return the snippets to insert into page.
- getSummary() — Return a short description of the configured snippet
- getTitle() — Return the title of this snippet provider for admin UIs