function domaincontext_context_condition_domain::execute in Domain Context 6
Same name and namespace in other branches
- 7 plugins/domaincontext_context_condition_domain.inc \domaincontext_context_condition_domain::execute()
File
- plugins/
domaincontext_context_condition_domain.inc, line 24 - Context plugin to supply the domain as a context condition.
Class
- domaincontext_context_condition_domain
- Expose domains as a context condition.
Code
function execute() {
global $_domain;
$domain_id = $_domain['domain_id'];
if ($domain_id == 0) {
$domain_id = -1;
}
$this->values[$domain_id] = array();
$contexts = $this
->get_contexts($domain_id);
foreach ($contexts as $context) {
$this->values[$domain_id][] = $context->name;
$this
->condition_met($context, $domain_id);
}
}