You are here

mobile_tools_context_condition_mobile.inc in Mobile Tools 6.2

Same filename and directory in other branches
  1. 6.3 plugins/mobile_tools_context_condition_mobile.inc

Integration with the Context module

File

plugins/mobile_tools_context_condition_mobile.inc
View source
<?php

/**
 * @file
 * Integration with the Context module
 */
class mobile_tools_context_condition_mobile extends context_condition {
  function condition_values() {
    return array_merge(array(
      'mobile' => 'Mobile',
      'desktop' => 'Desktop',
    ), mobile_tools_device_groups());
  }
  function execute($value) {
    foreach ($this
      ->get_contexts($value) as $context) {
      $this
        ->condition_met($context, $value);
    }
  }

}

Classes

Namesort descending Description
mobile_tools_context_condition_mobile @file Integration with the Context module