This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require "autoload.php"; | |
| use Drupal\Component\DependencyInjection\Dumper\PhpArrayDumper; | |
| use Drupal\Core\DependencyInjection\ContainerBuilder; | |
| use Symfony\Component\DependencyInjection\Reference; | |
| /* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php | |
| index f2be9ce..82f6228 100644 | |
| --- a/core/lib/Drupal/Core/Render/Renderer.php | |
| +++ b/core/lib/Drupal/Core/Render/Renderer.php | |
| @@ -131,10 +131,23 @@ public function renderRoot(&$elements) { | |
| // Render in its own render context. | |
| $this->isRenderingRoot = TRUE; | |
| - $output = $this->executeInRenderContext(new RenderContext(), function () use (&$elements) { | |
| - return $this->render($elements, TRUE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/core/modules/block/src/BlockRepository.php b/core/modules/block/src/BlockRepository.php | |
| index 485a66f..e2aa34e 100644 | |
| --- a/core/modules/block/src/BlockRepository.php | |
| +++ b/core/modules/block/src/BlockRepository.php | |
| @@ -77,9 +77,8 @@ public function getVisibleBlocksPerRegion(array $contexts) { | |
| foreach ($this->blockStorage->loadByProperties(array('theme' => $this->getTheme())) as $block_id => $block) { | |
| /** @var \Drupal\block\BlockInterface $block */ | |
| // Set the contexts on the block before checking access. | |
| - if ($block->setContexts($contexts)->access('view')) { | |
| - $full[$block->getRegion()][$block_id] = $block; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/core/lib/Drupal/Core/Template/TwigExtension.php b/core/lib/Drupal/Core/Template/TwigExtension.php | |
| index bb29cd1..5461283 100644 | |
| --- a/core/lib/Drupal/Core/Template/TwigExtension.php | |
| +++ b/core/lib/Drupal/Core/Template/TwigExtension.php | |
| @@ -420,7 +420,11 @@ public function renderVar($arg) { | |
| } | |
| if (is_object($arg)) { | |
| - if (method_exists($arg, '__toString')) { | |
| + // @todo Replace with a proper interface. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/core/lib/Drupal/Core/Render/BubbleableMetadata.php b/core/lib/Drupal/Core/Render/BubbleableMetadata.php | |
| index c56b421..748bc0b 100644 | |
| --- a/core/lib/Drupal/Core/Render/BubbleableMetadata.php | |
| +++ b/core/lib/Drupal/Core/Render/BubbleableMetadata.php | |
| @@ -39,6 +39,13 @@ class BubbleableMetadata { | |
| protected $postRenderCache; | |
| /** | |
| + * #placeholder metadata. | |
| + * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php | |
| index 69e99a0..8bdf86a 100644 | |
| --- a/core/lib/Drupal/Core/Render/Renderer.php | |
| +++ b/core/lib/Drupal/Core/Render/Renderer.php | |
| @@ -184,6 +184,11 @@ protected function doRender(&$elements, $is_root_call = FALSE) { | |
| $this->bubbleStack(); | |
| return $elements['#markup']; | |
| } | |
| + | |
| + // Store the cache ID for later comparison. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/core/includes/theme.inc b/core/includes/theme.inc | |
| index 47c99d9..30380f8 100644 | |
| --- a/core/includes/theme.inc | |
| +++ b/core/includes/theme.inc | |
| @@ -11,6 +11,7 @@ | |
| use Drupal\Core\Cache\CacheBackendInterface; | |
| use Drupal\Core\Template\Attribute; | |
| use Drupal\Core\Utility\ThemeRegistry; | |
| +use Drupal\Component\PhpStorage\PhpStorageFactory; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @file | |
| * The PHP page that serves all page requests on a Drupal installation. | |
| * | |
| * The routines here dispatch control to the appropriate handler, which then | |
| * prints the appropriate page. | |
| * | |
| * All Drupal code is released under the GNU General Public License. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| component('ordered_list', | |
| array( | |
| component('item', 'a', array('id' => 'id-a')), | |
| 'b', | |
| 'c'), | |
| array('id' => 'x') | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| === blocks.twig | |
| {% block sidebar %} | |
| Right | |
| {% endblock %} | |
| === test-base.twig | |
| <side> | |
| {% block sidebar %}Sidebar{% endblock %} | |
| </side> |