You are here

spaces_test.module in Spaces 7.3

Same filename and directory in other branches
  1. 6.3 tests/spaces_test.module
  2. 7 tests/spaces_test.module

File

tests/spaces_test.module
View source
<?php

include_once 'spaces_test.features.inc';

/**
 * Implements hook_system_info_alter().
 *
 * Expose the testing feature in Features module to spaces
 */
function spaces_test_system_info_alter(&$info, $file, $type) {
  if ($file->name == 'features_test') {
    $info['spaces']['types'][] = 'all';
  }
}

/**
 * Implements of hook_menu().
 */
function spaces_test_menu() {
  $items = array();
  $items['features/features_test'] = array(
    'title' => 'Settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'spaces_test_admin_form',
    ),
    'access callback' => 'spaces_access_admin_perms',
    'access arguments' => array(
      array(
        'administer site configuration',
      ),
    ),
    'type' => MENU_NORMAL_ITEM,
  );
  return $items;
}

/**
 * Spaces_test_admin_form implementation..
 */
function spaces_test_admin_form($form, &$form_state) {
  $form['features_test_setting'] = array(
    '#type' => 'checkbox',
    '#title' => t('Customized'),
    '#default_value' => variable_get('features_test_setting', FALSE),
  );
  return system_settings_form($form);
}

Functions

Namesort descending Description
spaces_test_admin_form Spaces_test_admin_form implementation..
spaces_test_menu Implements of hook_menu().
spaces_test_system_info_alter Implements hook_system_info_alter().