You are here

class space_mobile_tools in Mobile Tools 7.2

Same name and namespace in other branches
  1. 7.3 plugins/mobile_tools_spaces.inc \space_mobile_tools

Mobile Tools integration for Spaces.

Hierarchy

Expanded class hierarchy of space_mobile_tools

2 string references to 'space_mobile_tools'
mobile_tools_spaces_plugins in ./mobile_tools.module
Implements hook_spaces_plugins().
mobile_tools_spaces_registry in ./mobile_tools.module
Implements hook_spaces_registry().

File

plugins/mobile_tools_spaces.inc, line 13
Spaces plugin implementation for Mobile Tools device groups

View source
class space_mobile_tools extends space_type_purl {
  var $device = NULL;

  /**
   * Constructor
   */
  function __construct($type, $id = NULL) {
    parent::__construct($type, $id);
  }

  /**
   * Implementation of space->title().
   */
  function title() {
    return 'Mobile Tools Space';
  }

  /**
   * Override of activate().
   */
  function activate() {
    if (parent::activate()) {

      // Set the device group context for the Context module

      //if (module_exists('context')) {

      //   $plugin = context_get_plugin('condition', 'mobile');
      //   if (!empty($plugin)) {
      //     dpm($this);

      //$device_group = mobile_tools_get_active_device_group();

      //$plugin->execute($device_group);

      //   }

      //}

      //dpm($this);

      // Set the header
      // Set the theme
      // @see mobile_tools_custom_theme().
      // Add configured options
      // Replace old hook_init functionality

      /*function mobile_tools_init(){
          global $mobile_tools_device, $conf;
          // Skip everything in case Drush is used
          if (drupal_is_cli()) {
            return;
          }
          // Some small extras
          if (mobile_tools_site_type() == 'mobile') {
            $conf['default_nodes_main'] = variable_get('default_nodes_main_mobile', variable_get('default_nodes_main', 10));
          }
        }*/

      // @todo replace hook_boot functionality

      /*
      if (mobile_tools_site_type() == 'mobile') {
        $conf['site_frontpage'] = variable_get('site_frontpage_mobile', variable_get('site_frontpage', 'node'));
      }
      */
      return TRUE;
    }
    return FALSE;
  }

  /**
   * Override of load().
   */
  function load() {
    return TRUE;
  }

  /**
   * Implementation of space->router().
   */
  function router($op, $object = NULL, $is_active = TRUE) {
    switch ($op) {
      case 'init':
        return;
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
space_mobile_tools::$device property
space_mobile_tools::activate function Override of activate().
space_mobile_tools::load function Override of load().
space_mobile_tools::router function Implementation of space->router().
space_mobile_tools::title function Implementation of space->title().
space_mobile_tools::__construct function Constructor