function ViewsConfigUpdater::processSortFieldIdentifierUpdateHandler

Processes sort handlers by adding the sort identifier.

Parameters

array $handler: A display handler.

string $handler_type: The handler type.

Return value

bool Whether the handler was updated.

2 calls to ViewsConfigUpdater::processSortFieldIdentifierUpdateHandler()
ViewsConfigUpdater::needsSortFieldIdentifierUpdate in core/modules/views/src/ViewsConfigUpdater.php
Updates the sort handlers by adding default sort field identifiers.
ViewsConfigUpdater::updateAll in core/modules/views/src/ViewsConfigUpdater.php
Performs all required updates.

File

core/modules/views/src/ViewsConfigUpdater.php, line 556

Class

ViewsConfigUpdater
Provides a BC layer for modules providing old configurations.

Namespace

Drupal\views

Code

protected function processSortFieldIdentifierUpdateHandler(array &$handler, string $handler_type) : bool {
    if ($handler_type === 'sort' && !isset($handler['expose']['field_identifier'])) {
        $handler['expose']['field_identifier'] = $handler['id'];
        return TRUE;
    }
    return FALSE;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.