function ViewsConfigUpdater::processDefaultPagerHeadingUpdate
Processes displays and adds pagination_heading_level if necessary.
Parameters
$compound_handler: A compound display handler.
string $handler_type: The handler type.
Return value
bool Whether the handler was updated.
2 calls to ViewsConfigUpdater::processDefaultPagerHeadingUpdate()
- ViewsConfigUpdater::needsPagerHeadingUpdate in core/
modules/ views/ src/ ViewsConfigUpdater.php - Checks for each view if pagination_heading_level needs to be added.
- ViewsConfigUpdater::updateAll in core/
modules/ views/ src/ ViewsConfigUpdater.php - Performs all required updates.
File
-
core/
modules/ views/ src/ ViewsConfigUpdater.php, line 647
Class
- ViewsConfigUpdater
- Provides a BC layer for modules providing old configurations.
Namespace
Drupal\viewsCode
public function processDefaultPagerHeadingUpdate(array &$compound_handler, string $handler_type) : bool {
$allow_pager_type_update = [
'mini',
'full',
];
if ($handler_type === 'pager' && in_array($compound_handler['type'], $allow_pager_type_update) && !isset($compound_handler['options']['pagination_heading_level'])) {
$compound_handler['options']['pagination_heading_level'] = 'h4';
return TRUE;
}
return FALSE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.