Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663

This commit is contained in:
Greg Anderson 2015-10-08 11:40:12 -07:00
parent eb34d130a8
commit f32e58e4b1
8476 changed files with 211648 additions and 170042 deletions

View file

@ -1,58 +0,0 @@
<?php
/**
* @file
* Handles integration of PHP templates with the Drupal theme system.
*/
use Drupal\Core\Extension\Extension;
/**
* Implements hook_init().
*/
function phptemplate_init(Extension $theme) {
$theme->load();
}
/**
* Implements hook_theme().
*/
function phptemplate_theme($existing, $type, $theme, $path) {
$templates = drupal_find_theme_functions($existing, array($theme));
$templates += drupal_find_theme_templates($existing, '.tpl.php', $path);
return $templates;
}
/**
* Implements hook_extension().
*/
function phptemplate_extension() {
return '.tpl.php';
}
/**
* Implements hook_render_template().
*
* Renders a system default template, which is essentially a PHP template.
*
* @param $template_file
* The filename of the template to render.
* @param $variables
* A keyed array of variables that will appear in the output.
*
* @return
* The output generated by the template.
*/
function phptemplate_render_template($template_file, $variables) {
// Extract the variables to a local namespace
extract($variables, EXTR_SKIP);
// Start output buffering
ob_start();
// Include the template file
include \Drupal::root() . '/' . $template_file;
// End buffering and return its contents
return ob_get_clean();
}

View file

@ -1,5 +0,0 @@
type: theme_engine
name: PHPTemplate
core: 8.x
version: VERSION
package: Core

View file

@ -7,7 +7,7 @@
use Drupal\Component\Utility\Html;
use Drupal\Component\Utility\SafeMarkup;
use Drupal\Core\Render\SafeString;
use Drupal\Core\Render\Markup;
use Drupal\Core\Extension\Extension;
/**
@ -46,7 +46,7 @@ function twig_init(Extension $theme) {
* @param array $variables
* A keyed array of variables that will appear in the output.
*
* @return string|\Drupal\Component\Utility\SafeStringInterface
* @return string|\Drupal\Component\Render\MarkupInterface
* The output generated by the template, plus any debug information.
*/
function twig_render_template($template_file, array $variables) {
@ -116,7 +116,7 @@ function twig_render_template($template_file, array $variables) {
$output['debug_suffix'] .= "\n<!-- END OUTPUT from '" . Html::escape($template_file) . "' -->\n\n";
}
// This output has already been rendered and is therefore considered safe.
return SafeString::create(implode('', $output));
return Markup::create(implode('', $output));
}
/**