You are here

function skinr_panels_set_skin_options in Skinr 8.2

Same name and namespace in other branches
  1. 7.2 skinr_panels/skinr_panels.module \skinr_panels_set_skin_options()

Helper function to store skin options for later retrieval.

2 calls to skinr_panels_set_skin_options()
skinr_panels_get_skin_options in skinr_panels/skinr_panels.module
Helper function to retrieve stored skin options.
skinr_panels_skinr_preprocess_alter in skinr_panels/skinr_panels.module
Implements hook_skinr_preprocess_alter().

File

skinr_panels/skinr_panels.module, line 119
Provides Skinr integration with Panels.

Code

function skinr_panels_set_skin_options($skin = NULL, $reset = FALSE) {
  static $counter = 0;
  static $cache = array();
  if ($reset) {
    $cache = array();
  }
  if (!is_null($skin)) {
    $placeholder = 'skinr_placeholder_' . $counter++;
    $cache[$placeholder] = clone $skin;
    return $placeholder;
  }
  return $cache;
}