Commit 29c09eff authored by catch's avatar catch

Issue #1843650 by Mark Carver, jenlampton, Cottser: Remove the process layer...

Issue #1843650 by Mark Carver, jenlampton, Cottser: Remove the process layer (hook_process() and hook_process_HOOK).
parent 0932270a
This diff is collapsed.
......@@ -53,7 +53,6 @@
* @endcode
*
* @see template_preprocess_search_result()
* @see template_process()
*
* @ingroup themeable
*/
......
......@@ -22,7 +22,6 @@
* in the head.
*
* @see template_preprocess_html()
* @see template_process_html()
*
* @ingroup themeable
*/
......
......@@ -58,7 +58,6 @@
* - page.footer: Items for the footer region.
*
* @see template_preprocess_page()
* @see template_process()
* @see html.html.twig
*
* @ingroup themeable
......
......@@ -157,64 +157,6 @@ function hook_preprocess_HOOK(&$variables) {
$variables['attributes']['typeof'] = array('foaf:Image');
}
/**
* Process theme variables for templates.
*
* This hook allows modules to process theme variables for theme templates. It
* is called for all theme hooks implemented as templates, but not for theme
* hooks implemented as functions. hook_process_HOOK() can be used to process
* variables for a specific theme hook, whether implemented as a template or
* function.
*
* For more detailed information, see theme().
*
* @param $variables
* The variables array (modify in place).
* @param $hook
* The name of the theme hook.
*
* @deprecated as of Drupal 8.0, the process layer will be removed. Use
* preprocess instead and pass render arrays or objects with __toString()
* methods to templates and theme functions.
*/
function hook_process(&$variables, $hook) {
// Wraps variables in RDF wrappers.
if (!empty($variables['rdf_template_variable_attributes'])) {
foreach ($variables['rdf_template_variable_attributes'] as $variable_name => $attributes) {
$context = array(
'hook' => $hook,
'variable_name' => $variable_name,
'variables' => $variables,
);
$variables[$variable_name] = theme('rdf_template_variable_wrapper', array('content' => $variables[$variable_name], 'attributes' => $attributes, 'context' => $context));
}
}
}
/**
* Process theme variables for a specific theme hook.
*
* This hook allows modules to process theme variables for a specific theme
* hook. It should only be used if a module needs to override or add to the
* theme processing for a theme hook it didn't define.
*
* For more detailed information, see theme().
*
* @param $variables
* The variables array (modify in place).
*
* @deprecated as of Drupal 8.0, the process layer will be removed. Use
* preprocess instead and pass render arrays or objects with __toString()
* methods to templates and theme functions.
*/
function hook_process_HOOK(&$variables) {
// @todo There are no use-cases in Drupal core for this hook. Find one from a
// contributed module, or come up with a good example. Coming up with a good
// example might be tough, since the intent is for nearly everything to be
// achievable via preprocess functions, and for process functions to only be
// used when requiring the later execution time.
}
/**
* Respond to themes being enabled.
*
......
......@@ -681,8 +681,6 @@ function user_template_preprocess_default_variables_alter(&$variables) {
* Modules that make any changes to variables like 'name' or 'extra' must ensure
* that the final string is safe to include directly in the output by using
* check_plain() or filter_xss().
*
* @see template_process_username()
*/
function template_preprocess_username(&$variables) {
$account = $variables['account'] ?: drupal_anonymous_user();
......@@ -743,7 +741,6 @@ function template_preprocess_username(&$variables) {
* Drupal\Core\Template\Attribute class if not linking to the user's page.
*
* @see template_preprocess_username()
* @see template_process_username()
*/
function theme_username($variables) {
if (isset($variables['link_path'])) {
......
......@@ -6,7 +6,6 @@
* All of the available variables are mirrored in page.html.twig.
*
* @see template_preprocess_maintenance_page()
* @see bartik_process_maintenance_page()
*
* @ingroup themeable
*/
......
......@@ -74,8 +74,6 @@
*
* @see template_preprocess_page()
* @see bartik_preprocess_page()
* @see template_process()
* @see bartik_process_page()
* @see html.html.twig
*
* @ingroup themeable
......
......@@ -60,7 +60,6 @@
*
* @see template_preprocess_page()
* @see seven_preprocess_page()
* @see template_process()
* @see html.html.twig
*
* @ingroup themeable
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment