context_condition_sitewide.inc

Go to the documentation of this file.
00001 <?php
00002 
00003 /**
00004  * Simple sitewide context, always present.
00005  */
00006 class context_condition_sitewide extends context_condition {
00007   function condition_values() {
00008     return array(1 => t('Always active'));
00009   }
00010 
00011   function editor_form($context = NULL) {
00012     $form = parent::editor_form($context);
00013     $form[1]['#title'] = t('Always active');
00014     $form['#weight'] = -10;
00015     return $form;
00016   }
00017 
00018   function execute($value) {
00019     foreach ($this->get_contexts($value) as $context) {
00020       $this->condition_met($context, $value);
00021     }
00022   }
00023 }

Generated on Sat May 25 02:23:38 2013 for Context by  doxygen 1.4.7