function RouteBuilder::lazyLoadItself

Same name in other branches
  1. 9 core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php \Drupal\Core\ProxyClass\Routing\RouteBuilder::lazyLoadItself()
  2. 8.9.x core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php \Drupal\Core\ProxyClass\Routing\RouteBuilder::lazyLoadItself()
  3. 10 core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php \Drupal\Core\ProxyClass\Routing\RouteBuilder::lazyLoadItself()

Lazy loads the real service from the container.

Return value

object Returns the constructed real service.

File

core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php, line 61

Class

RouteBuilder
Provides a proxy class for \Drupal\Core\Routing\RouteBuilder.

Namespace

Drupal\Core\ProxyClass\Routing

Code

protected function lazyLoadItself() {
    if (!isset($this->service)) {
        $this->service = $this->container
            ->get($this->drupalProxyOriginalServiceId);
    }
    return $this->service;
}

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