You are here

function config_pages_context_get in Config Pages 8

Same name and namespace in other branches
  1. 8.3 config_pages.module \config_pages_context_get()
  2. 8.2 config_pages.module \config_pages_context_get()
  3. 7 config_pages.inc \config_pages_context_get()

Parameters

string $type: config_page type to get context.

Return value

array Return current context based on groups.

File

./config_pages.module, line 18
Module hooks.

Code

function config_pages_context_get($type) {
  $context = [];
  $type = ConfigPagesType::load($type);
  if (!$type) {
    return $context;
  }
  $context = $type
    ->getContextData();
  return $context;
}