\SnippetFolder
Synopsis
class SnippetFolder
extends DataObject
{
- // members
- private static array $db = ;
- private static array $has_one = ;
- private static array $has_many = ;
- private static array $extensions = ;
- private static array $allowed_children = ;
- private static string $default_sort = 'Name';
- private static string $default_child = 'Snippet';
- private static string $default_parent = 'SnippetLanguage';
- // methods
- public {bool} canView()
- public {bool} canEdit()
- public {bool} canDelete()
- public {bool} canCreate()
- public {FieldList} getCMSFields()
- public void hasSnippets()
- public {string} getTreeTitle()
- public {string} CMSTreeClasses()
- protected void onBeforeDelete()
- public {array} allowedChildren()
- public {string} default_child()
Hierarchy
Extends
- DataObject
Members
private
- $allowed_children
- $db
- $default_child
- $default_parent
- $default_sort
- $extensions
- $has_many
- $has_one
Methods
protected
- onBeforeDelete() — Removes all snippets from the folder before deleting
public
- CMSTreeClasses() — Return the CSS classes to apply to this node in the CMS tree
- allowedChildren() — Returns an array of the class names of classes that are allowed to be children of this class.
- canCreate() — Checks to see if the member can create or not
- canDelete() — Checks to see if the member can delete or not
- canEdit() — Checks to see if the member can edit or not
- canView() — Checks to see if the member can view or not
- default_child() — Returns the default child for this class
- getCMSFields() — Gets fields used in the cms
- getTreeTitle() — Returns two <span> html DOM elements, an empty <span> with the class 'jstree-pageicon' in front, following by a <span> wrapping around its Title.
- hasSnippets() — Determins if the folder has snippets return {bool} Returns true so that folders always show