popContext() public method

Remove the topmost context objects and return them
public popContext ( ) : array
return array the topmost context objects as associative array
 /**
  * @test
  */
 public function viewHelperRendersUriViaStringPointingToSubNodes()
 {
     $this->tsRuntime->pushContext('documentNode', $this->contentContext->getCurrentSiteNode()->getNode('home/about-us/mission'));
     $this->assertSame('<a href="/en/home/about-us/history.html">History</a>', $this->viewHelper->render('../history'));
     $this->tsRuntime->popContext();
     $this->assertSame('<a href="/en/home/about-us/our-mission.html">Our mission</a>', $this->viewHelper->render('about-us/mission'));
     $this->assertSame('<a href="/en/home/about-us/our-mission.html">Our mission</a>', $this->viewHelper->render('./about-us/mission'));
 }
 /**
  * @test
  */
 public function viewHelperRendersUriViaStringPointingToSubNodes()
 {
     $this->tsRuntime->pushContext('documentNode', $this->contentContext->getCurrentSiteNode()->getNode('home/about-us/mission'));
     $this->assertOutputLinkValid('en/home/about-us/history.html', $this->viewHelper->render('../history'));
     $this->tsRuntime->popContext();
     $this->assertOutputLinkValid('en/home/about-us/our-mission.html', $this->viewHelper->render('about-us/mission'));
     $this->assertOutputLinkValid('en/home/about-us/our-mission.html', $this->viewHelper->render('./about-us/mission'));
 }
 /**
  * Evaluate a TypoScript path with a given context without content caching
  *
  * This is used to render uncached segments "out of band" in getCachedSegment of ContentCache.
  *
  * @param string $path
  * @param array $contextArray
  * @return mixed
  *
  * TODO Find another way of disabling the cache (especially to allow cached content inside uncached content)
  */
 public function evaluateUncached($path, array $contextArray)
 {
     $previousEnableContentCache = $this->enableContentCache;
     $this->enableContentCache = false;
     $this->runtime->pushContextArray($contextArray);
     $result = $this->runtime->evaluate($path);
     $this->runtime->popContext();
     $this->enableContentCache = $previousEnableContentCache;
     return $result;
 }
 /**
  * Render the given TypoScript and return the rendered page
  *
  * @return string
  */
 protected function renderTypoScript()
 {
     $this->typoScriptRuntime->pushContextArray($this->variables);
     try {
         $output = $this->typoScriptRuntime->render($this->getTypoScriptPathForCurrentRequest());
     } catch (RuntimeException $exception) {
         throw $exception->getPrevious();
     }
     $this->typoScriptRuntime->popContext();
     return $output;
 }