You are here

function og_panels_get_all in Organic groups 6

Same name and namespace in other branches
  1. 5.8 og_panels.module \og_panels_get_all()
  2. 5 og_panels.module \og_panels_get_all()
  3. 5.3 og_panels.module \og_panels_get_all()
  4. 5.7 og_panels.module \og_panels_get_all()

Return an array of all og_panels attached to the given nid.

Parameters

int $nid:

Return value

array $rows An associative array keyed by the $did of the og_panel

3 calls to og_panels_get_all()
og_panels_menu in modules/og_panels/og_panels.module
og_panels_nodeapi in modules/og_panels/og_panels.module
og_panels_overview in modules/og_panels/og_panels.module
Menu callback. List the pages for this specified group. Provide helpful operations links.

File

modules/og_panels/og_panels.module, line 352

Code

function og_panels_get_all($nid) {
  $sql = "SELECT * FROM {og_panels} WHERE nid = %d ORDER BY default_page DESC, weight ASC";
  $result = db_query($sql, $nid);
  while ($row = db_fetch_object($result)) {
    $rows[$row->did] = $row;
  }
  if (isset($rows)) {
    return $rows;
  }
  return array();
}