\CMSMain
The main "content" area of the CMS.
This class creates a 2-frame layout - left-tree and right-form - to sit beneath the main
admin menu.
Synopsis
class CMSMain
extends LeftAndMain
implements
CurrentPageIdentifier,PermissionProvider
{
- // members
- public static string $url_segment = '';
- public static string $url_rule = '/$Action/$ID/$OtherID';
- public static integer $url_priority = 40;
- public static string $menu_title = 'Pages';
- public static integer $menu_priority = 10;
- public static string $tree_class = "SiteTree";
- public static string $subitem_class = "Member";
- public static array $allowed_actions = ;
- public static array $site_tree_filter_options = ;
- // Inherited members from LeftAndMain
- public static string $url_base;
- public static $url_segment;
- public static string $url_rule;
- public static $menu_title;
- public static integer $menu_priority;
- public static integer $url_priority;
- public static $tree_class;
- public static $ForceReload;
- public static string $help_link;
- public static array $allowed_actions;
- protected static array $extra_requirements;
- public static String $application_name;
- public static String $application_logo_text;
- public static string $application_link;
- public static unknown_type $application_logo;
- public static String $application_logo_style;
- protected static string $loading_image;
- // methods
- public static void T_SiteTreeFilterOptions()
- public void init()
- public boolean ShowSwitchView()
- public void SwitchView()
- public string Link()
- public void SiteTreeAsUL()
- public string getfilteredsubtree()
- public void SiteTreeFilters()
- public void SiteTreeFilterOptions()
- public void SiteTreeFilterDateField()
- public void SiteTreeFilterPageTypeField()
- public void generateDataTreeHints()
- public void generateTreeStylingJS()
- protected void jsDeclaration()
- public DataObjectSet PageTypes()
- public FormResponse save_siteconfig()
- public void getRecord()
- public void getEditForm()
- public Form RootForm()
- public void addpage()
- public void getNewItem()
- public void deletefromlive()
- public void performPublish()
- public void revert()
- public void delete()
- public void SideReports()
- public void ReportSelector()
- public LiteralField ReportFormParameters()
- public void sidereport()
- public void versions()
- public void rollback()
- public void unpublish()
- public void tellBrowserAboutPublicationChange()
- public void performRollback()
- public void getversion()
- public void compareversions()
- public void sendFormToBrowser()
- public void dialog()
- public void canceldraftchangesdialog()
- public void batchactions()
- public Form PublishItemsForm()
- public void BatchActionParameters()
- public void BatchActionList()
- public Form DeleteItemsForm()
- public void buildbrokenlinks()
- public void AddPageOptionsForm()
- public void getpagecount()
- public void publishall()
- public void restore()
- public void duplicate()
- public void duplicatewithchildren()
- public void createtranslation()
- public void providePermissions()
- public void LangSelector()
- public boolean MultipleLanguages()
- public boolean IsTranslatableEnabled()
- // Inherited methods from LeftAndMain
- public boolean canView()
- public void init()
- public void handleRequest()
- public boolean ShowSwitchView()
- public string Link()
- public static void menu_title_for_class()
- public void show()
- public void getitem()
- public void getLastFormIn()
- public DataObjectSet MainMenu()
- public void CMSTopMenu()
- protected void getTemplatesWithSuffix()
- public void Left()
- public void Right()
- public void getRecord()
- public void getSiteTreeFor()
- public void getsubtree()
- public void returnItemToUser()
- public void save()
- public string getActionUpdateJS()
- public string addTreeNodeJS()
- public string deleteTreeNodeJS()
- public static void ForceReload()
- public void ajaxupdateparent()
- public void ajaxupdatesort()
- public void CanOrganiseSitetree()
- public void deleteitems()
- public Form EmptyForm()
- public void EditForm()
- public void myprofile()
- public void Member_ProfileForm()
- public void printable()
- public void currentPageID()
- public void setCurrentPageID()
- public void currentPage()
- public void isCurrentPage()
- public void EditorToolbar()
- public string CMSVersion()
- public array SwitchView()
- public static void setApplicationName()
- public String getApplicationName()
- public String getApplicationLogoText()
- public void ApplicationLink()
- public void SectionTitle()
- public static void setLogo()
- public static void set_loading_image()
- public void LoadingImage()
- public void LogoStyle()
- public void MceRoot()
- public void callPageMethod()
- public static void require_javascript()
- public static void require_css()
- public static void require_themed_css()
Hierarchy
Tasks
Line | Task |
---|---|
11+ | Create some base classes to contain the generic functionality that will be replicated. |
221 | Enabling this means we load jQuery UI by default in the CMS, |
1403 | Allow in-memory creation of translations that don't persist in the database before the user requests it |
Members
protected
- $extra_requirements
—
array
Register additional requirements through the {@link Requirements class}. - $loading_image
public
- $ForceReload
- $allowed_actions
- $allowed_actions
-
$application_link
Set the application name, and the logo text. - $application_logo
—
unknown_type
The application logo path. Customisable by calling LeftAndMain::setLogo() - the first parameter. - $application_logo_style
—
String
The application logo style. Customisable by calling LeftAndMain::setLogo() - the second parameter. - $application_logo_text
—
String
The application logo text. Customisable by calling LeftAndMain::setApplicationName() - the second parameter. - $application_name
—
String
The application name. Customisable by calling LeftAndMain::setApplicationName() - the first parameter. -
$help_link
The url used for the link in the Help tab in the backend Value can be overwritten if required in _config.php -
$site_tree_filter_options
SiteTree Columns that can be filtered using the the Site Tree Search button - $subitem_class
- $tree_class
- $tree_class
- $url_base
—
string
The 'base' url for CMS administration areas. - $url_priority
- $url_priority
- $url_rule
- $url_rule
- $url_segment
- $url_segment
Methods
protected
- jsDeclaration() — Return a javascript instanciation of this array
public
- AddPageOptionsForm()
- BatchActionList() — Returns a list of batch actions
- BatchActionParameters()
- DeleteItemsForm()
- IsTranslatableEnabled()
- LangSelector() — Returns all languages with languages already used appearing first.
- Link() — Override {@link LeftAndMain} Link to allow blank URL segment for CMSMain.
- MultipleLanguages() — Determine if there are more than one languages in our site tree.
- PageTypes() — Populates an array of classes in the CMS which allows the user to change the page type.
- PublishItemsForm()
- ReportFormParameters() — Generate the parameter HTML for SideReports that have params
- ReportSelector()
- RootForm()
- ShowSwitchView() — If this is set to true, the "switchView" context in the template is shown, with links to the staging and publish site.
- SideReports()
- SiteTreeAsUL() — Return the entire site tree as a nested set of ULs
- SiteTreeFilterDateField()
- SiteTreeFilterOptions() — Returns the SiteTree columns that can be filtered using the the Site Tree Search button as a DataObjectSet
- SiteTreeFilterPageTypeField()
- SiteTreeFilters() — Returns a list of batch actions
- SwitchView() — Overloads the LeftAndMain::ShowView. Allows to pass a page as a parameter, so we are able to switch view also for archived versions.
- T_SiteTreeFilterOptions()
- addpage()
- batchactions() — Batch Actions Handler
- buildbrokenlinks()
- canceldraftchangesdialog()
- compareversions()
- createtranslation() — Create a new translation from an existing item, switch to this language and reload the tree.
- delete() — Delete the current page from draft stage.
- deletefromlive() — Delete the page from live. This means a page in draft mode might still exist.
- dialog()
- duplicate()
- duplicatewithchildren()
- generateDataTreeHints()
- generateTreeStylingJS()
- getEditForm()
- getNewItem()
- getRecord() — Get a database record to be managed by the CMS
- getfilteredsubtree() — Use a CMSSiteTreeFilter to only get certain nodes
- getpagecount() — Helper function to get page count
- getversion()
- init()
- performPublish() — Actually perform the publication step
- performRollback()
- providePermissions() — Provide the permission codes used by LeftAndMain.
- publishall()
- restore() — Restore a completely deleted page from the SiteTree_versions table.
- revert() — Reverts a page by publishing it to live.
- rollback() — Roll a page back to a previous version
- save_siteconfig() — Save the current sites {@link SiteConfig} into the database
- sendFormToBrowser()
- sidereport() — Get the content for a side report
- tellBrowserAboutPublicationChange() — Return a few pieces of information about a change to a page - Send the new status message - Update the action buttons - Update the treenote - Send a status message
- unpublish()
- versions() — Get the versions of the current page
Inherited from LeftAndMain
protected
- getTemplatesWithSuffix() — Return a list of appropriate templates for this class, with the given suffix
public
- ApplicationLink()
- CMSTopMenu()
- CMSVersion() — Return the version number of this application.
- CanOrganiseSitetree()
- EditForm()
- EditorToolbar() — Return the CMS's HTML-editor toolbar
- EmptyForm() — Returns a placeholder form, used by {@link getEditForm()} if no record is selected.
- ForceReload() — Sets a static variable on this class which means the panel will be reloaded.
- Left()
- Link() — You should implement a Link() function in your subclass of LeftAndMain, to point to the URL of that particular controller.
- LoadingImage()
- LogoStyle()
- MainMenu() — Returns the main menu of the CMS. This is also used by init() to work out which sections the user has access to.
- MceRoot() — Return the base directory of the tiny_mce codebase
- Member_ProfileForm()
- Right()
- SectionTitle() — Return the title of the current section, as shown on the main menu
- ShowSwitchView() — If this is set to true, the "switchView" context in the template is shown, with links to the staging and publish site.
- SwitchView()
- addTreeNodeJS() — Returns a javascript snippet to generate a tree node for the given page, if visible
- ajaxupdateparent() — Ajax handler for updating the parent of a tree node
- ajaxupdatesort() — Ajax handler for updating the order of a number of tree nodes $_GET[ID]: An array of node ids in the correct order $_GET[MovedNodeID]: The node that actually got moved
- callPageMethod() — Use this as an action handler for custom CMS buttons.
- canView()
- currentPage()
- currentPageID()
- deleteTreeNodeJS() — Returns a javascript snippet to remove a tree node for the given page, if it exists.
- deleteitems() — Delete a number of items
- getActionUpdateJS() — Returns a javascript snippet that will update the actions of the main form
- getApplicationLogoText() — Get the application logo text.
- getApplicationName() — Get the application name.
- getLastFormIn()
- getRecord()
- getSiteTreeFor() — Get a site tree displaying the nodes under the given objects
- getitem()
- getsubtree() — Get a subtree underneath the request param 'ID'.
- handleRequest()
- init()
- isCurrentPage()
- myprofile()
- printable()
- require_css() — Register the given stylesheet file as required.
- require_javascript() — Register the given javascript file as required in the CMS.
- require_themed_css() — Register the given "themeable stylesheet" as required.
- returnItemToUser() — Allows you to returns a new data object to the tree (subclass of sitetree) and updates the tree via javascript.
- save() — Save and Publish page handler
- setApplicationName()
- setCurrentPageID()
- setLogo() — Set the CMS application logo.
- set_loading_image() — Set the image shown when the CMS is loading.
- show()