function domaincontext_context_condition_domain::condition_values in Domain Context 7
Same name and namespace in other branches
- 6 plugins/domaincontext_context_condition_domain.inc \domaincontext_context_condition_domain::condition_values()
Fetches condition values.
Overrides context_condition::condition_values
File
- plugins/
domaincontext_context_condition_domain.inc, line 14 - Context plugin to supply the domain as a context condition.
Class
- domaincontext_context_condition_domain
- Expose domains as a context condition.
Code
function condition_values() {
$values = array();
$format = domain_select_format();
foreach (domain_domains() as $data) {
$data['domain_id'] == 0 ? $key = -1 : ($key = $data['domain_id']);
if ($data['valid'] || user_access('access inactive domains')) {
$values[$key] = empty($format) ? check_plain($data['sitename']) : $data['sitename'];
}
}
return $values;
}