You are here

function cmd_type_condition::execute in Context Mobile Detect 7

Same name and namespace in other branches
  1. 7.2 plugins/context_mobile_detect_type_condition.inc \cmd_type_condition::execute()

File

plugins/context_mobile_detect_type_condition.inc, line 16
The file, which controls Mobile Device Type plugin.

Class

cmd_type_condition
Main context class to detect user's device type.

Code

function execute() {
  $data = _context_mobile_detect_detect(FALSE);
  foreach ($this
    ->get_contexts($data['device_type']) as $context) {
    $this
      ->condition_met($context, $data['device_type']);
  }
}