function og_panels_get_all in Organic groups 5
Same name and namespace in other branches
- 5.8 og_panels.module \og_panels_get_all()
- 5.3 og_panels.module \og_panels_get_all()
- 5.7 og_panels.module \og_panels_get_all()
- 6 modules/og_panels/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 ./
og_panels.module - og_panels_nodeapi in ./
og_panels.module - og_panels_overview in ./
og_panels.module - Menu callback. List the pages for this specified group. Provide helpful operations links.
File
- ./
og_panels.module, line 354
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();
}