popsu-d7/sites/all/modules/context/plugins/context_condition_language.inc
Bachir Soussi Chiadmi 1bc61b12ad first import
2015-04-08 11:40:19 +02:00

17 lines
378 B
PHP

<?php
/**
* Expose current language as a context condition.
*/
class context_condition_language extends context_condition {
function condition_values() {
return module_exists('locale') ? locale_language_list() : array();
}
function execute($value) {
foreach ($this->get_contexts($value) as $context) {
$this->condition_met($context, $value);
}
}
}