Webylon 3.2 API Docs
  • Package
  • Class
  • Tree
  • Deprecated
  • Download
Version: current
  • 3.2
  • 3.1

Packages

  • 1c
    • exchange
      • catalog
  • auth
  • Booking
  • building
    • company
  • cart
    • shipping
    • steppedcheckout
  • Catalog
    • monument
  • cms
    • assets
    • batchaction
    • batchactions
    • bulkloading
    • comments
    • content
    • core
    • export
    • newsletter
    • publishers
    • reports
    • security
    • tasks
  • Dashboard
  • DataObjectManager
  • event
  • faq
  • forms
    • actions
    • core
    • fields-basic
    • fields-dataless
    • fields-datetime
    • fields-files
    • fields-formatted
    • fields-formattedinput
    • fields-relational
    • fields-structural
    • transformations
    • validators
  • googlesitemaps
  • guestbook
  • installer
  • newsletter
  • None
  • photo
    • gallery
  • PHP
  • polls
  • recaptcha
  • sapphire
    • api
    • bulkloading
    • control
    • core
    • cron
    • dev
    • email
    • fields-formattedinput
    • filesystem
    • formatters
    • forms
    • i18n
    • integration
    • misc
    • model
    • parsers
    • search
    • security
    • tasks
    • testing
    • tools
    • validation
    • view
    • widgets
  • seo
    • open
      • graph
  • sfDateTimePlugin
  • spamprotection
  • stealth
    • captha
  • subsites
  • userform
    • pagetypes
  • userforms
  • webylon
  • widgets

Classes

  • BigFilesReport
  • BrokenLinksReport
  • CMSMain
  • CMSMainMarkingFilter
  • CMSMenu
  • CMSMenuItem
  • CMSSiteTreeFilter
  • CMSSiteTreeFilter_ChangedPages
  • CMSSiteTreeFilter_DeletedPages
  • CMSSiteTreeFilter_Search
  • NonUsedFilesReport
  • RedirectorPage
  • RedirectorPage_Controller
  • SideReport_BrokenFiles
  • SideReport_BrokenLinks
  • SideReport_BrokenRedirectorPages
  • SideReport_BrokenVirtualPages
  • SideReport_EmptyPages
  • SideReport_RecentlyEdited
  • SideReport_ToDo
  • SideReportView
  • SideReportWrapper
  • SilverStripeNavigator
  • SilverStripeNavigatorItem
  • SilverStripeNavigatorItem_ArchiveLink
  • SilverStripeNavigatorItem_CMSLink
  • SilverStripeNavigatorItem_LiveLink
  • SilverStripeNavigatorItem_StageLink
  • WidgetAreaEditor

Class CMSMenu

The object manages the main CMS menu. See LeftAndMain::init() for example usage.

SS_Object
Extended by CMSMenu implements IteratorAggregate, i18nEntityProvider
Package: cms\content
Used by: CMSMain::init()
Used by: CommentAdmin::init()
Used by: CustomMenuAdmin::init()
Used by: FaqAdmin::init()
Used by: LeftAndMain::init()
Used by: NewsletterAdmin::init()
Used by: ReportAdmin::init()
Used by: SecurityAdmin::init()
Used by: WidgetAdmin::init()
Located at cms/code/CMSMenu.php

Methods summary

public static
# populate_menu( )

Generate CMS main menu items by collecting valid subclasses of LeftAndMain

Generate CMS main menu items by collecting valid subclasses of LeftAndMain

public static
# add_director_rules( )

Add Director rules for all of the CMS controllers.

Add Director rules for all of the CMS controllers.

public static The
# add_controller( string $controllerClass )

Add a LeftAndMain controller to the CMS menu.

Add a LeftAndMain controller to the CMS menu.

Parameters

$controllerClass
string $controllerClass The class name of the controller

Returns

The
result of the operation
protected static
# menuitem_for_controller( mixed $controllerClass )

Return a CMSMenuItem to add the given controller to the CMSMenu

Return a CMSMenuItem to add the given controller to the CMSMenu

protected static
# add_director_rule_for_controller( mixed $controllerClass )

Add the appropriate Director rules for the given controller.

Add the appropriate Director rules for the given controller.

public static boolean
# add_link( string $code, string $menuTitle, string $url, integer $priority = -1 )

Add an arbitrary URL to the CMS menu.

Add an arbitrary URL to the CMS menu.

Parameters

$code
string $code A unique identifier (used to create a CSS ID and as it's key in $menu_items
$menuTitle
string $menuTitle The link's title in the CMS menu
$url
string $url The url of the link
$priority
integer $priority The menu priority (sorting order) of the menu item. Higher priorities will be further left.

Returns

boolean
The result of the operation.
public static boolean
# add_menu_item( string $code, string $menuTitle, string $url, string $controllerClass = null, mixed $priority = -1 )

Add a navigation item to the main administration menu showing in the top bar.

Add a navigation item to the main administration menu showing in the top bar.

uses CMSMenu::$menu_items

Parameters

$code
string $code Unique identifier for this menu item (e.g. used by CMSMenu::replace_menu_item() and CMSMenu::remove_menu_item(). Also used as a CSS-class for icon customization.
$menuTitle
string $menuTitle Localized title showing in the menu bar
$url
string $url A relative URL that will be linked in the menu bar.
$controllerClass
string $controllerClass The controller class for this menu, used to check permisssions. If blank, it's assumed that this is public, and always shown to users who have the rights to access some other part of the admin area.
$priority

Returns

boolean
Success
public static array
# get_menu_item( string $code )

Get a single menu item by its code value.

Get a single menu item by its code value.

Parameters

$code
string $code

Returns

array
array
public static array
# get_menu_items( )

Get all menu entries.

Get all menu entries.

Returns

array
array
public static array
# get_viewable_menu_items( Member $member = null )

Get all menu items that the passed member can view. Defaults to Member::currentUser().

Get all menu items that the passed member can view. Defaults to Member::currentUser().

Parameters

$member
Member $member

Returns

array
array
public static
# remove_menu_item( string $code )

Removes an existing item from the menu.

Removes an existing item from the menu.

Parameters

$code
string $code Unique identifier for this menu item
public static
# clear_menu( )

Clears the entire menu

Clears the entire menu

public static boolean
# replace_menu_item( string $code, string $menuTitle, string $url, string $controllerClass = null, mixed $priority = -1 )

Replace a navigation item to the main administration menu showing in the top bar.

Replace a navigation item to the main administration menu showing in the top bar.

Parameters

$code
string $code Unique identifier for this menu item (e.g. used by CMSMenu::replace_menu_item() and CMSMenu::remove_menu_item(). Also used as a CSS-class for icon customization.
$menuTitle
string $menuTitle Localized title showing in the menu bar
$url
string $url A relative URL that will be linked in the menu bar. Make sure to add a matching route via Director::addRules() to this url.
$controllerClass
string $controllerClass The controller class for this menu, used to check permisssions. If blank, it's assumed that this is public, and always shown to users who have the rights to access some other part of the admin area.
$priority

Returns

boolean
Success
protected static
# add_menu_item_obj( mixed $code, mixed $cmsMenuItem )

Add a previously built menuitem object to the menu

Add a previously built menuitem object to the menu

public static array
# get_cms_classes( string $root = 'LeftAndMain', boolean $recursive = true )

A utility funciton to retrieve subclasses of a given class that are instantiable (ie, not abstract) and have a valid menu title.

A utility funciton to retrieve subclasses of a given class that are instantiable (ie, not abstract) and have a valid menu title.

Parameters

$root
string $root The root class to begin finding subclasses
$recursive
boolean $recursive Look for subclasses recursively?

Returns

array
Valid, unique subclasses
public
# getIterator( )

IteratorAggregate Interface Method. Iterates over the menu items.

IteratorAggregate Interface Method. Iterates over the menu items.

Implementation of

IteratorAggregate::getIterator()
public array
# provideI18nEntities( )

Provide menu titles to the i18n entity provider

Provide menu titles to the i18n entity provider

Returns

array
All entites in an associative array, with entity name as the key, and a numerical array of pseudo-arguments for _t() as a value.

Implementation of

i18nEntityProvider::provideI18nEntities()

Magic methods summary

Properties summary

protected static array $menu_item_changes
#

An array of changes to be made to the menu items, in the order that the changes should be applied. Each item is a map in one of the two forms:
- array('type' => 'add', 'item' => new CMSMenuItem(...) )
- array('type' => 'remove', 'code' => 'codename' )

An array of changes to be made to the menu items, in the order that the changes should be applied. Each item is a map in one of the two forms: - array('type' => 'add', 'item' => new CMSMenuItem(...) ) - array('type' => 'remove', 'code' => 'codename' )

protected static boolean $menu_is_cleared
#

Set to true if clear_menu() is called, to indicate that the default menu shouldn't be included

Set to true if clear_menu() is called, to indicate that the default menu shouldn't be included

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -
Webylon 3.2 API Docs API documentation generated by ApiGen 2.8.0