Skip to content
Snippets Groups Projects
Commit 80f94a42 authored by catch's avatar catch
Browse files

Issue #3443959: DialogRenderer::getTitleAsStringable() does not support all...

Issue #3443959: DialogRenderer::getTitleAsStringable() does not support all return types of TitleResolverInterface::getTitle()

(cherry picked from commit 4a4a78b5)
parent d29fd50d
No related branches found
No related tags found
5 merge requests!11769Issue #3517987: Add option to contextual filters to encode slashes in query parameter.,!11185Issue #3477324 by andypost, alexpott: Fix usage of str_getcsv() and fgetcsv() for PHP 8.4,!9944Issue #3483353: Consider making the createCopy config action optionally fail...,!8325Update file Sort.php,!8095Expose document root on install
Pipeline #166160 passed
Pipeline: drupal

#166163

    ......@@ -132,17 +132,9 @@ protected function getDialogOptions(Request $request): array {
    * The title as a string or stringable object.
    */
    protected function getTitleAsStringable(array $main_content, Request $request, RouteMatchInterface $route_match): \Stringable|string|null {
    $title = NULL;
    if (array_key_exists('#title', $main_content)) {
    if (is_array($main_content['#title'])) {
    $title = $this->renderer->renderInIsolation($main_content['#title']);
    }
    else {
    $title = $main_content['#title'];
    }
    }
    elseif ($this->titleResolver->getTitle($request, $route_match->getRouteObject())) {
    $title = $this->titleResolver->getTitle($request, $route_match->getRouteObject())->render();
    $title = $main_content['#title'] ?? $this->titleResolver->getTitle($request, $route_match->getRouteObject());
    if (is_array($title)) {
    $title = $this->renderer->renderInIsolation($title);
    }
    return $title;
    }
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment