function content_load

7.x content.module content_load($cid, $reset = FALSE)
6.x content.module content_load($cid, $reset = FALSE)
5.x content.module content_load($cid)

Load the content from the database and return an array, by calling hook_content_load.

Parameters

unknown_type $cid:

35 calls to content_load()
alerts.module in modules/alerts/alerts.module
module file for Alerts
alerts_advisees_alerts_form in modules/alerts/alerts.module
Displays alerts for our various advisees.
alerts_display_advisee_activities_page in modules/alerts/alerts.module
Display all advisee activities since the beginning of time, thanks to pager query.
calendar.module in modules/calendar/calendar.module
calendar_access_can_cancel_appointment in modules/calendar/calendar.module
Make sure the user is allowed to cancel this appointment.

... See full list

File

modules/content/content.module, line 2048

Code

function content_load($cid, $reset = FALSE) {
  if (!$cid) {
    return null;
  }

  if ($reset) {
    unset($GLOBALS ['content_cache'][$cid]);
  }

  if (isset($GLOBALS ['content_cache'][$cid])) {
    return $GLOBALS ['content_cache'][$cid];
  }


  $content = new stdClass();
  $content->cid = $cid;

  // First, always call content_content_load.
  call_user_func_array("content_content_load", array(&$content));

  // Next, go through all other modules (NOT "content") that might implement this hook.
  $modules = modules_implement_hook("content_load", array('content'));
  foreach ($modules as $module) {
    call_user_func_array($module . "_content_load", array(&$content));
  }


  // Add to our globals cache
  $GLOBALS ['content_cache'][$cid] = $content;

  return $content;
}