diff --git a/core/lib/Drupal/Core/Template/TwigExtension.php b/core/lib/Drupal/Core/Template/TwigExtension.php index 9cd17b0..ed616db 100644 --- a/core/lib/Drupal/Core/Template/TwigExtension.php +++ b/core/lib/Drupal/Core/Template/TwigExtension.php @@ -18,14 +18,11 @@ */ class TwigExtension extends \Twig_Extension { public function getFunctions() { - // @todo re-add unset => twig_unset if this is really needed return array( // @todo Remove URL function once http://drupal.org/node/1778610 is resolved. 'url' => new \Twig_Function_Function('url'), // These functions will receive a TwigReference object, if a render array is detected - 'hide' => new TwigReferenceFunction('twig_hide'), 'render_var' => new TwigReferenceFunction('twig_render_var'), - 'show' => new TwigReferenceFunction('twig_show'), ); } @@ -40,6 +37,8 @@ public function getFilters() { // @see TwigNodeTrans::compileString() 'passthrough' => new \Twig_Filter_Function('twig_raw_filter'), 'placeholder' => new \Twig_Filter_Function('twig_raw_filter'), + // @todo Consider renaming to exclude or something. + 'hide' => new \Twig_Filter_Function('twig_hide'), ); } @@ -53,14 +52,11 @@ public function getNodeVisitors() { public function getTokenParsers() { return array( - new TwigFunctionTokenParser('hide'), - new TwigFunctionTokenParser('show'), new TwigTransTokenParser(), ); } - public function getName() - { + public function getName() { return 'drupal_core'; } } diff --git a/core/modules/block/templates/block-list.html.twig b/core/modules/block/templates/block-list.html.twig index 873d192..fb5ee44 100644 --- a/core/modules/block/templates/block-list.html.twig +++ b/core/modules/block/templates/block-list.html.twig @@ -13,10 +13,9 @@ * @ingroup themeable */ #} -{% hide(form.place_blocks) %}