\CodeBank
Synopsis
class CodeBank
extends LeftAndMain
implements
PermissionProvider
{
- // members
- private static string $url_segment = 'codeBank';
- private static string $tree_class = 'SnippetLanguage';
- private static string $url_rule = '/$Action/$ID/$OtherID';
- private static integer $url_priority = 59;
- private static string $filter_class = 'SnippetTreeFilter';
- private static string $snippet_search_engine = 'DefaultCodeBankSearchEngine';
- private static array $required_permission_codes = ;
- private static array $allowed_actions = ;
- private static string $session_namespace = 'CodeBank';
- private boolean $_folderAdded = false;
- // methods
- public void __construct()
- public void init()
- public void index()
- public {string} Link()
- protected {string} LinkWithSearch()
- public {string} getLinkMain()
- public {Form} getEditForm()
- public {string} getLinkTreeView()
- public {string} tree()
- public void getsubtree()
- public String updatetreenodes()
- public {bool} TreeIsFiltered()
- public {string} SiteTreeAsUL()
- public String getSiteTreeFor()
- public {DataObject} getRecord()
- public {string} getEditLink()
- public {string} getLinkSettings()
- public {bool} hasSnippets()
- public ArrayList Breadcrumbs()
- public {Form} SearchForm()
- public final {string} getVersion()
- public {string} compare()
- public {string} getTreeHints()
- public void addSnippet()
- public void moveSnippet()
- public {string} addFolder()
- public {Form} AddFolderForm()
- public {string} doAddFolder()
- public {string} renameFolder()
- public {Form} RenameFolderForm()
- public {string} doRenameFolder()
- public void deleteFolder()
- public {string} printSnippet()
- public {array} providePermissions()
- protected {bool} hasOldTables()
Hierarchy
Extends
- LeftAndMain
Implements
- PermissionProvider
Members
private
- $_folderAdded
- $allowed_actions
- $filter_class
- $required_permission_codes
- $session_namespace
- $snippet_search_engine
- $tree_class
- $url_priority
- $url_rule
- $url_segment
Methods
protected
- LinkWithSearch() — Generates the link with search params
- hasOldTables() — Tests to see if the old tables exist
public
- __construct() — Constructor
- AddFolderForm() — Form used for adding a folder
- Breadcrumbs()
- Link() — Override {@link LeftAndMain} Link to allow blank URL segment for CMSMain.
- RenameFolderForm() — Form used for renaming a folder
- SearchForm() — Generates the search form
- SiteTreeAsUL() — Gets the snippet language tree as an unordered list
- TreeIsFiltered() — Checks to see if the tree should be filtered or not
- addFolder() — Handles requests to add a folder
- addSnippet() — Handles requests to add a snippet or folder to a language
- compare() — Handles rendering of the compare view
- deleteFolder() — Deletes a folder node
- doAddFolder() — Handles actually adding a folder to the databsae
- doRenameFolder() — Performs the rename of the folder
- getEditForm() — Gets the form used for viewing snippets
- getEditLink() — Returns the link to view/edit snippets
- getLinkMain() — Gets the main tab link
- getLinkSettings() — Returns the link to settings
- getLinkTreeView() — Gets the link to the tree view
- getRecord() — Gets the snippet for editing/viewing
- getSiteTreeFor() — Get a site tree HTML listing which displays the nodes under the given criteria.
- getTreeHints() — Create serialized JSON string with tree hints data to be injected into 'data-hints' attribute of root node of jsTree.
- getVersion() — Gets the current version of Code Bank
- getsubtree() — Get a subtree underneath the request param 'ID'.
- hasSnippets() — Detects if a node has snippets or not
- index()
- init() — Initializes the code bank admin
- moveSnippet() — Handles moving of a snippet when the tree is reordered
- printSnippet() — Handles requests to print the current snippet
- providePermissions() — Returns a map of permission codes to add to the dropdown shown in the Security section of the CMS.
- renameFolder() — Handles requests to rename a folder
- tree() — Gets the snippet tree view
- updatetreenodes() — Allows requesting a view update on specific tree nodes.