function ViewsConfigUpdater::processRememberRolesUpdate

Processes filters and removes disabled remember roles.

Parameters

array $handler: A display handler.

string $handler_type: The handler type.

Return value

bool Whether the handler was updated.

File

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

Class

ViewsConfigUpdater
Provides a BC layer for modules providing old configurations.

Namespace

Drupal\views

Code

public function processRememberRolesUpdate(array &$handler, string $handler_type) : bool {
    if ($handler_type === 'filter' && !empty($handler['expose']['remember_roles'])) {
        $needsUpdate = FALSE;
        foreach (array_keys($handler['expose']['remember_roles'], '0', TRUE) as $role_key) {
            unset($handler['expose']['remember_roles'][$role_key]);
            $needsUpdate = TRUE;
        }
        return $needsUpdate;
    }
    return FALSE;
}

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