views_handler_argument_users_roles_rid.inc
Same filename in other branches
File
-
modules/
user/ views_handler_argument_users_roles_rid.inc
View source
<?php
/**
* Allow role ID(s) as argument.
*
* @ingroup views_argument_handlers
*/
class views_handler_argument_users_roles_rid extends views_handler_argument_many_to_one {
function title_query() {
$titles = array();
$placeholders = implode(', ', array_fill(0, sizeof($this->value), '%d'));
$result = db_query("SELECT name FROM {role} WHERE rid IN ({$placeholders})", $this->value);
while ($term = db_fetch_object($result)) {
$titles[] = check_plain($term->name);
}
return $titles;
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
views_handler_argument_users_roles_rid | Allow role ID(s) as argument. |