\DynamicTemplateAdmin
Reports section of the CMS.
All reports that should show in the ReportAdmin section
of the CMS need to subclass , and implement
the appropriate methods and variables that are required.
Synopsis
class DynamicTemplateAdmin
extends ModelAdmin
{
- // members
- public static string $menu_title = 'Dynamic Templates';
- public static string $url_segment = 'dynamictemplates';
- public static array $managed_models = ;
- public static string $url_rule = '/$ModelClass/$Action/$ID';
- public static string $tree_class = 'DynamicTemplate';
- public static array $allowed_actions = ;
- protected $newFileId = NULL;
- // methods
- public void init()
- public void TarballAvailable()
- public static void tarball_available()
- public void ZipAvailable()
- public static void zip_available()
- public void LoadFileEditForm()
- public void getEditForm()
- public void save()
- public void templateimport()
- public void TemplateImportForm()
- public Form FileEditForm()
- public void saveFileEdit()
- public void LoadLinkedFileViewForm()
- public Form LinkedFileViewForm()
- public void getCurrentDynamicTemplate()
- public void LoadNewFileForm()
- public void LoadThemeLinkOptionsForm()
- public void ThemeLinkOptionsForm()
- public void saveThemeLink()
- public void LoadThemeCopyOptionsForm()
- public void ThemeCopyOptionsForm()
- public void saveThemeCopy()
- public void DeleteFileFromTemplate()
- public void UnlinkFileFromTemplate()
- protected void getThemeTree()
- protected void getDirHtml()
- public void getDirectoryRecursive()
- public void ChangeTemplateType()
- public void exportaszip()
- public void exportastarball()
Hierarchy
Extends
- ModelAdmin
Tasks
Line | Task |
---|---|
321 | check permissions |
398 | This should only sync things within a given path |
Members
protected
- $newFileId
public
- $allowed_actions
- $managed_models
- $tree_class
- $url_rule
- $url_segment
Methods
protected
public
- ChangeTemplateType() — Called via ajax request to change the type of a template.
- DeleteFileFromTemplate()
- FileEditForm() — Return the file edit form, which is used for editing the source text of a file in the template.
- LinkedFileViewForm() — Return the linked file view form, which shows a readonly form that contains the source text of the file being viewed.
- LoadFileEditForm()
- LoadLinkedFileViewForm()
- LoadNewFileForm() — Called when a new file is being created. The new file name is part of the URL. Creates the file in the appropriate place, and returns the source editor on it.
- LoadThemeCopyOptionsForm()
- LoadThemeLinkOptionsForm()
- TarballAvailable() — Return true if tar is available, false if not.
- TemplateImportForm()
- ThemeCopyOptionsForm()
- ThemeLinkOptionsForm()
- UnlinkFileFromTemplate()
- ZipAvailable() — Return true if zip library is available, false if not.
- exportastarball()
- exportaszip()
- getCurrentDynamicTemplate() — Return the DynamicTemplate object currently being edited, which is held in the session, or return null if its not set.
- getDirectoryRecursive()
- getEditForm()
- init()
- save()
- saveFileEdit()
- saveThemeCopy() — Handle the saving of ThemeCopyOptionsForm. The only type of information we're in is fields named 'tree-node-n' where n is a number we can ignore. The value of each field is a path relative to root. Basically for each file identified, we create a new file based on that file, as if it were uploaded.
- saveThemeLink() — Handle the saving of ThemeLinkOptionsForm. The only type of information we're in is fields named 'tree-node-n' where n is a number we can ignore. The value of each field is a path relative to root. We need to reconcile the links in the manifest with links identified in the form submission, giving us these cases: - the file was not in the manifest before, and needs to be added. The file path is present in the form submission.
- tarball_available()
- templateimport()
- zip_available()