function menu_test_menu_name

Same name in other branches
  1. 9 core/modules/system/tests/modules/menu_test/menu_test.module \menu_test_menu_name()
  2. 8.9.x core/modules/system/tests/modules/menu_test/menu_test.module \menu_test_menu_name()
  3. 10 core/modules/system/tests/modules/menu_test/menu_test.module \menu_test_menu_name()
  4. 11.x core/modules/system/tests/modules/menu_test/menu_test.module \menu_test_menu_name()

Helper function for the testMenuName() test. Used to change the menu_name parameter of a menu.

Parameters

$new_name: If set, will change the menu_name value.

Return value

The menu_name value to use.

2 calls to menu_test_menu_name()
MenuRouterTestCase::testMenuName in modules/simpletest/tests/menu.test
Tests for menu_name parameter for hook_menu().
menu_test_menu in modules/simpletest/tests/menu_test.module
Implements hook_menu().

File

modules/simpletest/tests/menu_test.module, line 482

Code

function menu_test_menu_name($new_name = '') {
    static $name = 'original';
    if ($new_name) {
        $name = $new_name;
    }
    return $name;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.