Contao\CoreBundle\Routing\UrlGenerator::getContext PHP Method

getContext() public method

public getContext ( )
    public function getContext()
    {
        return $this->router->getContext();
    }

Usage Example

 /**
  * Tests the setContext() method.
  */
 public function testSetContext()
 {
     $generator = new UrlGenerator(new ParentUrlGenerator(new RouteCollection(), new RequestContext()), $this->mockContaoFramework(), false);
     $context = new RequestContext();
     $generator->setContext($context);
     $this->assertSame($context, $generator->getContext());
 }