Example #1
0
 /**
  * Render the currently set URL
  *
  * @return string
  */
 protected function renderCurrentUrl()
 {
     return '<!-- Print current URL -->
         <div class="link-browser-section link-browser-current-link">
             <strong>' . htmlspecialchars($this->getLanguageService()->getLL('currentLink')) . ': ' . htmlspecialchars($this->currentLinkHandler->formatCurrentUrl()) . '</strong>
         </div>';
 }
    /**
     * Injects the request object for the current request or subrequest
     * As this controller goes only through the main() method, it is rather simple for now
     *
     * @param ServerRequestInterface $request the current request
     * @param ResponseInterface $response the prepared response object
     * @return ResponseInterface the response with the content
     */
    public function mainAction(ServerRequestInterface $request, ResponseInterface $response)
    {
        $this->determineScriptUrl($request);
        $this->initVariables($request);
        $this->loadLinkHandlers();
        $this->initCurrentUrl();
        $menuData = $this->buildMenuArray();
        $renderLinkAttributeFields = $this->renderLinkAttributeFields();
        $browserContent = $this->displayedLinkHandler->render($request);
        $this->initDocumentTemplate();
        $content = $this->doc->startPage('Link Browser');
        $content .= $this->doc->getFlashMessages();
        if ($this->currentLink) {
            $content .= '<!-- Print current URL -->
				<table border="0" cellpadding="0" cellspacing="0" id="typo3-curUrl">
					<tr>
						<td>' . $this->getLanguageService()->getLL('currentLink', true) . ': ' . htmlspecialchars($this->currentLinkHandler->formatCurrentUrl()) . '</td>
					</tr>
				</table>';
        }
        $content .= $this->doc->getTabMenuRaw($menuData);
        $content .= $renderLinkAttributeFields;
        $content .= '<div class="linkBrowser-tabContent">' . $browserContent . '</div>';
        $content .= $this->doc->endPage();
        $response->getBody()->write($this->doc->insertStylesAndJS($content));
        return $response;
    }
    /**
     * Render the currently set URL
     *
     * @return string
     */
    protected function renderCurrentUrl()
    {
        return '<!-- Print current URL -->
				<table border="0" cellpadding="0" cellspacing="0" id="typo3-curUrl">
					<tr>
						<td>' . $this->getLanguageService()->getLL('currentLink', true) . ': ' . htmlspecialchars($this->currentLinkHandler->formatCurrentUrl()) . '</td>
					</tr>
				</table>';
    }