You are here

public static function MostPopularService::fetch in Drupal Most Popular 6

Same name and namespace in other branches
  1. 7 classes/services.php \MostPopularService::fetch()

Fetches the service with the given service ID.

Parameters

integer $sid: The service ID of the service to fetch.

Return value

MostPopularService The service with the given service ID, or null if none could be found.

4 calls to MostPopularService::fetch()
MostPopularLastRun::getDefaultThrottles in classes/lastrun.php
Invokes hook_mostpopular_service('throttles') on the given service to get the default throttles to use for the currently-configured intervals.
mostpopular_block in ./mostpopular.module
Implements hook_block() to create the most popular block.
mostpopular_service_config_form in ./mostpopular.admin.inc
mostpopular_service_config_form_submit in ./mostpopular.admin.inc

File

classes/services.php, line 118
Defines a wrapper for the mostpopular_services table.

Class

MostPopularService
@file Defines a wrapper for the mostpopular_services table.

Code

public static function fetch($sid) {
  $sid = (int) $sid;
  self::fetchAvailable();
  if (self::$enabledList[$sid]) {
    return self::$enabledList[$sid];
  }
  if (self::$disabledList[$sid]) {
    return self::$disabledList[$sid];
  }
  return NULL;
}