Class LeftAndMain
LeftAndMain is the parent class of all the two-pane views in the CMS. If you are wanting to add more areas to the CMS, you can do it by subclassing LeftAndMain.
This is essentially an abstract class which should be subclassed. See CMSMain for a good example.
- Object
-
ViewableData
implements
IteratorAggregate
-
RequestHandler
-
Controller
-
LeftAndMain
Direct known subclasses
AssetAdmin,
CMSMain,
WebylonImportAdmin,
WidgetAdmin,
CommentAdmin,
CustomMenuAdmin,
DashboardAdmin,
FaqAdmin,
ModelAdmin,
NewsletterAdmin,
ReportAdmin,
SecurityAdmin
Indirect known subclasses
BookingOrderAdmin,
CatalogAdmin,
RedirectEntry_Admin,
RoomServiceAdmin,
ShippingMethodAdmin,
SubsiteAdmin,
VKNotificationQueueAdmin,
GuestbookAdmin,
ImportAdmin,
LoggerAdmin,
NewDocumentsAdmin,
OrderAdmin,
PaymentAdmin,
PollPage,
RealtyImportAdmin
Methods summary
public
boolean
|
|
public
|
|
public
boolean
|
#
ShowSwitchView( )
If this is set to true, the "switchView" context in the template is shown, with links to the staging and publish site. |
public
string
|
|
public static
|
#
menu_title_for_class( mixed $class )
Returns the menu title for the given LeftAndMain subclass. Implemented static so that we can get this value without instantiating an object. Menu title is not internationalised. |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
protected
|
#
getTemplatesWithSuffix( mixed $suffix )
Return a list of appropriate templates for this class, with the given suffix |
public
|
|
public
|
|
public
|
|
public
|
#
getSiteTreeFor( mixed $className, mixed $rootID = null, mixed $childrenMethod = null, mixed $numChildrenMethod = null, mixed $filterFunction = null, mixed $minNodeCount = 30 )
Get a site tree displaying the nodes under the given objects |
public
|
#
getsubtree( mixed $request )
Get a subtree underneath the request param 'ID'. If ID = 0, then get the whole tree. |
public
|
#
returnItemToUser( mixed $p )
Allows you to returns a new data object to the tree (subclass of sitetree) and updates the tree via javascript. |
public
|
|
public
string
|
#
getActionUpdateJS( mixed $record )
Returns a javascript snippet that will update the actions of the main form |
public
string
|
#
addTreeNodeJS( mixed $page, mixed $select = false )
Returns a javascript snippet to generate a tree node for the given page, if visible |
public
string
|
#
deleteTreeNodeJS( mixed $page )
Returns a javascript snippet to remove a tree node for the given page, if it exists. |
public static
|
|
public
|
|
public
|
#
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 |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
string
|
#
CMSVersion( )
Return the version number of this application. Uses the subversion path information in <mymodule>/silverstripe_version (automacially replaced $URL$ placeholder). |
public
|
#
versionFromVersionFile( mixed $fileContent )
Return the version from the content of a silverstripe_version file |
public
array
|
|
public static
|
|
public
String
|
|
public
String
|
|
public
|
|
public
|
|
public static
|
|
public static
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public static
|
#
require_javascript( mixed $file )
Register the given javascript file as required in the CMS. Filenames should be relative to the base, eg, SAPPHIRE_DIR . '/javascript/loader.js' |
public static
|
|
public static
|
#
require_themed_css( mixed $name, mixed $media = null )
Register the given "themeable stylesheet" as required. Themeable stylesheets have globally unique names, just like templates and PHP files. Because of this, they can be replaced by similarly named CSS files in the theme directory. |
Methods inherited from Controller
CurrentMember(),
Now(),
PastMember(),
PastVisitor(),
can(),
curr(),
defaultAction(),
disableBasicAuth(),
getAction(),
getFormOwner(),
getRequest(),
getResponse(),
getSession(),
getURLParams(),
getViewer(),
handleAction(),
handleRequest(),
hasAction(),
hasActionTemplate(),
has_curr(),
isAjax(),
join_links(),
popCurrent(),
pushCurrent(),
redirect(),
redirectBack(),
redirectedTo(),
render(),
setSession(),
setURLParams()
Methods inherited from RequestHandler
__construct(),
allowedActions(),
checkAccessAction(),
httpError()
Methods inherited from ViewableData
ATT_val(),
BaseHref(),
CSSClasses(),
ColumnBreak(),
ColumnCalc(),
ColumnNumber(),
ColumnPad(),
ColumnPos(),
CurrentPage(),
Debug(),
Even(),
EvenOdd(),
First(),
FirstLast(),
HasPerm(),
IsAjax(),
JS_val(),
Last(),
Me(),
Middle(),
MiddleString(),
Modulus(),
MultipleOf(),
Odd(),
Pos(),
RAW_val(),
SQL_val(),
ThemeDir(),
ThemeName(),
Top(),
TotalItems(),
XML_val(),
__get(),
__isset(),
__set(),
buildCastingCache(),
cachedCall(),
castingClass(),
castingHelper(),
castingHelperPair(),
castingObjectCreator(),
castingObjectCreatorPair(),
customise(),
defineMethods(),
escapeTypeForField(),
getField(),
getIterator(),
getSecurityID(),
getXMLValues(),
hasField(),
hasValue(),
i18nLocale(),
iteratorProperties(),
obj(),
renderWith(),
setCustomisedObj(),
setField()
Methods inherited from Object
__call(),
__toString(),
__wakeup(),
addMethodsFrom(),
addStaticVars(),
addWrapperMethod(),
add_extension(),
add_static_var(),
allMethodNames(),
cacheToFile(),
cacheToFileWithArgs(),
clearCache(),
combined_static(),
create(),
createMethod(),
create_from_string(),
exists(),
extInstance(),
extend(),
getCustomClass(),
getExtensionInstance(),
getExtensionInstances(),
get_extensions(),
get_static(),
hasExtension(),
hasMethod(),
has_extension(),
invokeWithExtensions(),
is_a(),
loadCache(),
parentClass(),
parse_class_spec(),
remove_extension(),
sanitiseCachename(),
saveCache(),
set_stat(),
set_static(),
set_uninherited(),
stat(),
strong_create(),
uninherited(),
uninherited_static(),
useCustomClass()
Magic methods summary
Properties summary
public static
string
|
$url_base |
#
The 'base' url for CMS administration areas. Note that if this is changed, many javascript behaviours need to be updated with the correct url |
public static
mixed
|
$url_segment | |
public static
string
|
$url_rule | |
public static
mixed
|
$menu_title | |
public static
integer
|
$menu_priority | |
public static
integer
|
$url_priority | |
public static
mixed
|
$tree_class | |
public static
mixed
|
$ForceReload | |
public static
array
|
$allowed_actions |
#
Define a list of action handling methods that are allowed to be called directly by URLs. The variable should be an array of action names. This sample shows the different values that it can contain: |
protected static
array
|
$extra_requirements |
#
Register additional requirements through the Requirements class. Used mainly to work around the missing "lazy loading" functionality for getting css/javascript required after an ajax-call (e.g. loading the editform). |
public static
String
|
$application_name |
#
The application name. Customisable by calling LeftAndMain::setApplicationName() - the first parameter. |
public static
String
|
$application_logo_text |
#
The application logo text. Customisable by calling LeftAndMain::setApplicationName() - the second parameter. |
public static
string
|
$application_link |
#
Set the application name, and the logo text. |
public static
unknown_type
|
$application_logo |
#
The application logo path. Customisable by calling LeftAndMain::setLogo() - the first parameter. |
public static
String
|
$application_logo_style |
#
The application logo style. Customisable by calling LeftAndMain::setLogo() - the second parameter. |
protected static
string
|
$loading_image |
Properties inherited from Controller
$action,
$baseInitCalled,
$basicAuthEnabled,
$controller_stack,
$request,
$requestParams,
$response,
$session,
$urlParams,
$url_handlers
Properties inherited from RequestHandler
Properties inherited from ViewableData
$casting,
$customisedObject,
$default_cast,
$failover,
$iteratorPos,
$iteratorTotalItems