Commit 0e566dc7 authored by Chris Shantz's avatar Chris Shantz
Browse files

Merge branch '1.0.x' into prod/1.0.x

parents 57c1861c f468baf1
......@@ -337,27 +337,14 @@ function _uw_fdsu_theme_resp_get_image_info(FileFieldItemList $field) {
*/
function uw_fdsu_theme_resp_preprocess_node(&$variables) {
// The UW service object.
$uwService = \Drupal::service('uw_cfg_common.uw_service');
// The types of nodes the need preprocessing.
$nodes_to_preprocess = [
'uw_ct_blog',
'uw_ct_event',
'uw_ct_news_item',
'uw_ct_web_page',
'uw_ct_catalog_item',
'uw_ct_contact',
'uw_ct_profile',
];
$nodes_to_preprocess = $uwService->uwGetNodePreprocessing('full');
// Teaser to be preprocessed.
$teasers_to_preprocess = [
'uw_ct_blog',
'uw_ct_event',
'uw_ct_news_item',
'uw_ct_web_page',
'uw_ct_catalog_item',
'uw_ct_contact',
'uw_ct_profile',
];
$teasers_to_preprocess = $uwService->uwGetNodePreprocessing('teaser');
// If there is a node that needs preprocessing,
// set the appropriate variables.
......@@ -481,15 +468,12 @@ function uw_fdsu_theme_resp_preprocess_container(&$variables) {
$variables['attributes']['class'][0] == 'layout-builder'
) {
// The UW service object.
$uwService = \Drupal::service('uw_cfg_common.uw_service');
// The list of content types that will have header
// and footer in layout builder pages.
$content_types = [
'uw_ct_blog',
'uw_ct_news_item',
'uw_ct_event',
'uw_ct_contact',
'uw_ct_profile',
];
$content_types = $uwService->uwGetNodePreprocessing('layout_container');
// Get the node object.
$node = \Drupal::routeMatch()->getParameter('node');
......@@ -499,9 +483,6 @@ function uw_fdsu_theme_resp_preprocess_container(&$variables) {
// get the header and footer.
if ($node && in_array($node->getType(), $content_types)) {
// The UW service object.
$uwService = \Drupal::service('uw_cfg_common.uw_service');
// Get the node object.
$node = \Drupal::routeMatch()->getParameter('node');
......
Supports Markdown
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