You are here

function panels_sections_section_load in Panels Sections 6.2

Same name and namespace in other branches
  1. 6 panels_sections.module \panels_sections_section_load()

load and return a section object given an $sid

File

./panels_sections.module, line 283
Allows you to define panels_sections of your site and apply s to those panels_sections.

Code

function panels_sections_section_load($sid) {
  static $sections = array();
  if (!key_exists($sid, $sections)) {
    $result = db_query('SELECT * FROM {panels_sections_data} WHERE sid = %d', $sid);
    $section = db_fetch_object($result);
    $sections[$sid] = $section;
  }
  return $sections[$sid];
}