diff --git a/core/lib/Drupal/Core/EventSubscriber/HtmlViewSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/HtmlViewSubscriber.php index ed2e87b..c777a33 100644 --- a/core/lib/Drupal/Core/EventSubscriber/HtmlViewSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/HtmlViewSubscriber.php @@ -60,11 +60,14 @@ public function onPartialHtmlResponse(GetResponseForControllerResultEvent $event // @todo this is really lazy, but the easiest way to get $page_{top,bottom}. this can be removed once the responsibility is shifted into displays/controllers $page = element_info('page'); - foreach ($this->moduleHandler->getImplementations('page_build') as $module) { - $function = $module . '_page_build'; - $function($page); + + if ($event->getRequestType() === HttpKernelInterface::MASTER_REQUEST) { + foreach ($this->moduleHandler->getImplementations('page_build') as $module) { + $function = $module . '_page_build'; + $function($page); + } + $this->moduleHandler->alter('page', $page); } - $this->moduleHandler->alter('page', $page); // @todo these are horrible passthrough hacks; remove them incrementally as we implement the respective pieces elsewhere. $vars = array( diff --git a/core/lib/Drupal/Core/PartialResponse.php b/core/lib/Drupal/Core/PartialResponse.php index 43694b0..8976e64 100644 --- a/core/lib/Drupal/Core/PartialResponse.php +++ b/core/lib/Drupal/Core/PartialResponse.php @@ -61,22 +61,6 @@ public function getContent() { } /** - * Adds another meta tag, to be output in HTML head. - * - * @param $tag - */ - public function addMetaTag($tag) { - // @todo implement this - } - - /** - * Gets all meta tags for output. - */ - public function getMetaTags() { - // @todo implement this - } - - /** * Sets the title of this PartialResponse. * * Handling of this title varies depending on what is consuming this @@ -105,24 +89,4 @@ public function hasTitle() { public function getTitle() { return $this->title; } - - /** - * Sets the AssetBag for this PartialResponse. - * - * The AssetBag has all of its own logic for sorting out assets and deciding - * where they should go; the PartialResponse is only response for carrying it - * around. - * - * @todo https://drupal.org/node/1762204 - */ - public function setAssetBag() { - - } - - /** - * Returns the AssetBag contained by this PartialResponse. - */ - public function getAssetBag() { - - } }