You are here

function skinr_context_group_load_unchanged in Skinr 7.2

Same name and namespace in other branches
  1. 8.2 skinr_context/skinr_context.module \skinr_context_group_load_unchanged()

Load an uncached version of a skin settings group object.

Parameters

$gid: The skin settings group ID.

Return value

A fully-populated skin settings group object.

6 calls to skinr_context_group_load_unchanged()
SkinrContextApiTestCase::testSkinrContextGroupHooks in skinr_context/tests/skinr_context.test
Test hook invocations for CRUD operations on skin settings groups.
skinr_context_group_import in skinr_context/skinr_context.module
Import a skin settigns group object as defined in skinr_context_group_defaults().
skinr_context_group_save in skinr_context/skinr_context.module
Save a skin group object.
skinr_context_ui_form_submit in skinr_context/skinr_context_ui.module
Form submission handler for skinr_context_form_alter().
skinr_context_ui_group_list_form_submit in skinr_context/skinr_context_ui.edit.inc
Form submission handler for skinr_context_ui_group_list_form().

... See full list

File

skinr_context/skinr_context.module, line 271
Provides Skinr integration with Context.

Code

function skinr_context_group_load_unchanged($gid) {

  // Load an uncached version of the skin settings object. Specify order to
  // ensure consistent import/export.
  $group = db_query("SELECT gid, module, element, title, description, conditions, condition_mode, weight, status FROM {skinr_groups} WHERE gid = :gid", array(
    ':gid' => $gid,
  ))
    ->fetchObject();

  // Unserialize options array.
  if ($group) {
    $group->conditions = unserialize($group->conditions);

    // Let modules modify the skin settings group.
    module_invoke_all('skinr_context_group_load', $group);
  }
  return $group;
}