mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
MINOR ajshort: Updated CMSMenu to use Object::get_static() to get configuration information.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@79361 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
fb6b248501
commit
02d9dd60e7
@ -32,12 +32,11 @@ class CMSMenu extends Object implements Iterator, i18nEntityProvider
|
||||
* when the item is removed. Functionality needed in {@link Director}.
|
||||
*/
|
||||
public static function add_controller($controllerClass) {
|
||||
// Get static bits
|
||||
$urlBase = eval("return $controllerClass::\$url_base;");
|
||||
$urlSegment = eval("return $controllerClass::\$url_segment;");
|
||||
$urlRule = eval("return $controllerClass::\$url_rule;");
|
||||
$urlPriority = eval("return $controllerClass::\$url_priority;");
|
||||
$menuPriority = eval("return $controllerClass::\$menu_priority;");
|
||||
$urlBase = Object::get_static($controllerClass, 'url_base');
|
||||
$urlSegment = Object::get_static($controllerClass, 'url_segment');
|
||||
$urlRule = Object::get_static($controllerClass, 'url_rule');
|
||||
$urlPriority = Object::get_static($controllerClass, 'url_priority');
|
||||
$menuPriority = Object::get_static($controllerClass, 'menu_priority');
|
||||
|
||||
// Don't add menu items defined the old way
|
||||
if($urlSegment === null) return;
|
||||
|
Loading…
Reference in New Issue
Block a user