function views_post_update_table_display_cache_max_age
Fix cache max age for table displays.
File
-
core/
modules/ views/ views.post_update.php, line 327
Code
function views_post_update_table_display_cache_max_age(&$sandbox = NULL) {
\Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'view', function ($view) {
/** @var \Drupal\views\ViewEntityInterface $view */
$displays = $view->get('display');
foreach ($displays as $display_name => &$display) {
if (isset($display['display_options']['style']['type']) && $display['display_options']['style']['type'] === 'table') {
return TRUE;
}
}
return FALSE;
});
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.