protected function LocalTaskManagerTest::getLocalTaskFixtures in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php \Drupal\Tests\Core\Menu\LocalTaskManagerTest::getLocalTaskFixtures()
Return some local tasks plugin definitions.
Return value
array An array of plugin definition keyed by plugin ID.
6 calls to LocalTaskManagerTest::getLocalTaskFixtures()
- LocalTaskManagerTest::getLocalTasksCache in core/
tests/ Drupal/ Tests/ Core/ Menu/ LocalTaskManagerTest.php - Returns the cache entry expected when running getLocalTaskForRoute().
- LocalTaskManagerTest::setupFactory in core/
tests/ Drupal/ Tests/ Core/ Menu/ LocalTaskManagerTest.php - Setups the plugin factory with some local task plugins.
- LocalTaskManagerTest::testGetLocalTaskForRouteWithEmptyCache in core/
tests/ Drupal/ Tests/ Core/ Menu/ LocalTaskManagerTest.php - Tests the cache of the local task manager with an empty initial cache.
- LocalTaskManagerTest::testGetLocalTasksForRouteForChild in core/
tests/ Drupal/ Tests/ Core/ Menu/ LocalTaskManagerTest.php - Tests the getLocalTasksForRoute method on a child.
- LocalTaskManagerTest::testGetLocalTasksForRouteSingleLevelTitle in core/
tests/ Drupal/ Tests/ Core/ Menu/ LocalTaskManagerTest.php - Tests the getLocalTasksForRoute method.
File
- core/
tests/ Drupal/ Tests/ Core/ Menu/ LocalTaskManagerTest.php, line 286 - Contains \Drupal\Tests\Core\Menu\LocalTaskManagerTest.
Class
- LocalTaskManagerTest
- @coversDefaultClass \Drupal\Core\Menu\LocalTaskManager @group Menu
Namespace
Drupal\Tests\Core\MenuCode
protected function getLocalTaskFixtures() {
$definitions = array();
$definitions['menu_local_task_test_tasks_settings'] = array(
'route_name' => 'menu_local_task_test_tasks_settings',
'title' => 'Settings',
'base_route' => 'menu_local_task_test_tasks_view',
);
$definitions['menu_local_task_test_tasks_edit'] = array(
'route_name' => 'menu_local_task_test_tasks_edit',
'title' => 'Settings',
'base_route' => 'menu_local_task_test_tasks_view',
'weight' => 20,
);
// Make this ID different from the route name to catch code that
// confuses them.
$definitions['menu_local_task_test_tasks_view.tab'] = array(
'route_name' => 'menu_local_task_test_tasks_view',
'title' => 'Settings',
'base_route' => 'menu_local_task_test_tasks_view',
);
$definitions['menu_local_task_test_tasks_view_child1'] = array(
'route_name' => 'menu_local_task_test_tasks_child1_page',
'title' => 'Settings child #1',
'parent_id' => 'menu_local_task_test_tasks_view.tab',
);
$definitions['menu_local_task_test_tasks_view_child2'] = array(
'route_name' => 'menu_local_task_test_tasks_child2_page',
'title' => 'Settings child #2',
'parent_id' => 'menu_local_task_test_tasks_view.tab',
'base_route' => 'this_should_be_replaced',
);
// Add the ID and defaults from the LocalTaskManager.
foreach ($definitions as $id => &$info) {
$info['id'] = $id;
$info += array(
'id' => '',
'route_name' => '',
'route_parameters' => array(),
'title' => '',
'base_route' => '',
'parent_id' => NULL,
'weight' => 0,
'options' => array(),
'class' => 'Drupal\\Core\\Menu\\LocalTaskDefault',
);
}
return $definitions;
}