commit 3d895f1035ca124e1995a7f76a919bb888419af7 Author: Joel Pittet Date: Sun May 25 10:21:24 2014 -0700 move getHead getScripts and getStyles to HtmlPage diff --git a/core/lib/Drupal/Core/Page/HtmlFragment.php b/core/lib/Drupal/Core/Page/HtmlFragment.php index 99e0f7c..18f587a 100644 --- a/core/lib/Drupal/Core/Page/HtmlFragment.php +++ b/core/lib/Drupal/Core/Page/HtmlFragment.php @@ -135,40 +135,6 @@ public function &getMetaElements() { } /** - * Implodes the meta and link elements for the template. - * - * @return - * A string of meta and link tags. - */ - public function getHead() { - return implode("\n", $this->getMetaElements()) . implode("\n", $this->getLinkElements()); - } - - /** - * Returns a themed presentation of all JavaScript code for the current page. - * - * @return - * All JavaScript code segments and includes for the scope as HTML tags. - * - * @see drupal_get_js() - */ - public function getScripts($scope = 'header') { - return drupal_get_js($scope); - } - - /** - * Returns a themed representation of all stylesheets to attach to the page. - * - * @return - * A string of XHTML CSS tags. - * - * @see drupal_get_css() - */ - public function getStyles() { - return drupal_get_css(); - } - - /** * Sets the response content. * * This should be the bulk of the page content, and will ultimately be placed diff --git a/core/lib/Drupal/Core/Page/HtmlPage.php b/core/lib/Drupal/Core/Page/HtmlPage.php index e568667..a42aadb 100644 --- a/core/lib/Drupal/Core/Page/HtmlPage.php +++ b/core/lib/Drupal/Core/Page/HtmlPage.php @@ -78,6 +78,40 @@ public function getHtmlAttributes() { } /** + * Implodes the meta and link elements for the template. + * + * @return + * A string of meta and link tags. + */ + public function getHead() { + return implode("\n", $this->getMetaElements()) . implode("\n", $this->getLinkElements()); + } + + /** + * Returns a themed presentation of all JavaScript code for the current page. + * + * @return + * All JavaScript code segments and includes for the scope as HTML tags. + * + * @see drupal_get_js() + */ + public function getScripts($scope = 'header') { + return drupal_get_js($scope); + } + + /** + * Returns a themed representation of all stylesheets to attach to the page. + * + * @return + * A string of XHTML CSS tags. + * + * @see drupal_get_css() + */ + public function getStyles() { + return drupal_get_css(); + } + + /** * Returns the HTML attributes for the body element of this page. * * @return \Drupal\Core\Template\Attribute