You are here

function _custompage_context_get_custompages in Custom Page 6

Same name and namespace in other branches
  1. 7 custompage.context.inc \_custompage_context_get_custompages()
2 calls to _custompage_context_get_custompages()
custompage_context_conditions in ./custompage.context.inc
Implementation of hook_context_conditions().
custompage_context_condition_alias::condition_values in plugins/custompage_context_condition_alias.inc

File

./custompage.context.inc, line 19

Code

function _custompage_context_get_custompages() {
  static $custom_pages;
  if (is_array($custom_pages)) {

    //performance optimization
    return $custom_pages;
  }
  $custom_pages = array();
  $mappings = _custompage_get_mappings();
  foreach ($mappings as $mapping) {
    $custom_pages[$mapping->key] = $mapping->title;
  }
  ksort($custom_pages);
  return $custom_pages;
}