SilverStripe\TagManager\Model\Snippet
Represents one snippet added to the site with is params configured
Synopsis
class Snippet
extends DataObject
{
- // members
- private static string $table_name = 'Snippet';
- private static string $singular_name = "Tag";
- private static array $db = ;
- private static array $has_many = ;
- private static array $summary_fields = ;
- private static array $active_labels = ;
- private static string $default_sort = "Sort";
- private static array $disabled_types = ;
- // methods
- public void getTitle()
- public void getSnippetSummary()
- public void getActiveLabel()
- protected void getSnippetProvider()
- protected array getSnippetTypes()
- private boolean isAllowedType()
- public void getCMSFields()
- public void getCMSValidator()
- public array getSnippets()
- // Inherited methods from ParamExpander
- protected void expandParams()
- public void getField()
- public void setField()
Hierarchy
Members
private
- $active_labels
- $db
- $default_sort
- $disabled_types
—
array
A list of disabled tag types. These can be added on a per project basis to limit the amount of types available to the content author. - $has_many
- $singular_name
- $summary_fields
- $table_name
Methods
private
- isAllowedType() — Checks if the given class is allowed to be used by the content author.
protected
- getSnippetProvider() — Return the snippet provider attached to this record
- getSnippetTypes() — Return the snippet provider attached to this record. This will exclude disabled snippet types.
public
- getActiveLabel()
- getCMSFields()
- getCMSValidator()
- getSnippetSummary()
- getSnippets() — Return the snippets generated by the configured provider
- getTitle()