$allContext = $modx->getCollection('modContext');This question has been answered by BobRay. See the first response.
/* Custom collection loader that forces access policy checking. */
$query = $modx->newQuery('modContext');
$rowCollection = array();
if ($query->prepare() && $query->stmt->execute()) {
$rowCollection = $query->stmt->fetchAll(PDO:FETCH_ASSOC);
}
PDO:FETCH_ASSOC
Array
(
[0] => Array
(
[modContext_key] => web
[modContext_name] =>
[modContext_description] => The default front-end context for your web site.
[modContext_rank] => 0
)
[1] => Array
(
[modContext_key] => mgr
[modContext_name] =>
[modContext_description] => The default manager or administration context for content management activity.
[modContext_rank] => 0
)
}