function DialogRenderer::getDialogOptions

Same name in other branches
  1. 10 core/lib/Drupal/Core/Render/MainContent/DialogRenderer.php \Drupal\Core\Render\MainContent\DialogRenderer::getDialogOptions()

Returns the dialog options from request.

Parameters

\Symfony\Component\HttpFoundation\Request $request: The HTTP request.

Return value

array The dialog options used for OpenDialogCommand.

2 calls to DialogRenderer::getDialogOptions()
DialogRenderer::renderResponse in core/lib/Drupal/Core/Render/MainContent/DialogRenderer.php
Renders the main content render array into a response.
ModalRenderer::renderResponse in core/lib/Drupal/Core/Render/MainContent/ModalRenderer.php
Renders the main content render array into a response.

File

core/lib/Drupal/Core/Render/MainContent/DialogRenderer.php, line 111

Class

DialogRenderer
Default main content renderer for dialog requests.

Namespace

Drupal\Core\Render\MainContent

Code

protected function getDialogOptions(Request $request) : array {
    if ($request->getMethod() === 'GET') {
        return $request->query
            ->all('dialogOptions');
    }
    return $request->request
        ->all('dialogOptions');
}

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