function LinksetControllerTestBase::rebuildIfNeeded

Same name in other branches
  1. 11.x core/modules/system/tests/src/Functional/Menu/LinksetControllerTestBase.php \Drupal\Tests\system\Functional\Menu\LinksetControllerTestBase::rebuildIfNeeded()

Rebuild the router only if needed.

1 call to LinksetControllerTestBase::rebuildIfNeeded()
LinksetControllerMultiLingualTest::setUp in core/modules/system/tests/src/Functional/Menu/LinksetControllerMultiLingualTest.php
Test set up.

File

core/modules/system/tests/src/Functional/Menu/LinksetControllerTestBase.php, line 176

Class

LinksetControllerTestBase
A base class for implementing LinksetController tests.

Namespace

Drupal\Tests\system\Functional\Menu

Code

public function rebuildIfNeeded() {
    
    /** @var \Drupal\Core\Routing\RouteBuilderInterface $router_builder */
    $router_builder = $this->container
        ->get('router.builder');
    $router_builder->rebuildIfNeeded();
}

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