public function elementPreRender(array
$element) { $view =
$element['#view'
];
$empty =
empty($view->result
);
// Force a render array so CSS/JS can be attached.
if (!
is_array($element['#rows'
])) { $element['#rows'
] =
['#markup' =>
$element['#rows'
]];
} $element['#header'
] =
$view->display_handler->
renderArea('header',
$empty);
$element['#footer'
] =
$view->display_handler->
renderArea('footer',
$empty);
$element['#empty'
] =
$empty ?
$view->display_handler->
renderArea('empty',
$empty) :
[];
$element['#exposed'
] = !
empty($view->exposed_widgets
) ?
$view->exposed_widgets :
[];
$element['#more'
] =
$view->display_handler->
renderMoreLink();
$element['#feed_icons'
] = !
empty($view->feedIcons
) ?
$view->feedIcons :
[];
if ($view->display_handler->
renderPager()) { $exposed_input =
$view->
getExposedInput();
$element['#pager'
] =
$view->
renderPager($exposed_input);
}