addDebugOutput example

        // placeholders must be processed, to prevent breaking the render cache         // in case of nested elements with #cache set.         if ($is_root_call) {
          $this->replacePlaceholders($elements);
        }
        // Mark the element markup as safe if is it a string.         if (is_string($elements['#markup'])) {
          $elements['#markup'] = Markup::create($elements['#markup']);
        }
        // Add debug output to the renderable array on cache hit.         if ($this->rendererConfig['debug'] === TRUE) {
          $elements = $this->addDebugOutput($elements, TRUE);
        }
        // The render cache item contains all the bubbleable rendering metadata         // for the subtree.         $context->update($elements);
        // Render cache hit, so rendering is finished, all necessary info         // collected!         $context->bubble();
        return $elements['#markup'];
      }
    }
    // Two-tier caching: track pre-bubbling elements' #cache, #lazy_builder and
Home | Imprint | This part of the site doesn't use cookies.