Gets a list of contexts in the system.
array
public function getContexts() {
$query = \Drupal::database()
->select('locales_source', 'ls');
$query
->fields('ls', [
'context',
'context',
]);
$query
->distinct();
$query
->orderBy('ls.context');
return $query
->execute()
->fetchAllKeyed();
}