You are here

public static function RotatingBanner::getAll in Rotating Banner 7

Same name and namespace in other branches
  1. 7.2 rotating_banner.classes.inc \RotatingBanner::getAll()
1 call to RotatingBanner::getAll()
rotating_banner_block_info in ./rotating_banner.module
Implements hook_block_info().

File

./rotating_banner.classes.inc, line 208

Class

RotatingBanner

Code

public static function getAll() {
  $result = db_select('rotating_banners', 'rb')
    ->fields('rb')
    ->execute()
    ->fetchAll(PDO::FETCH_CLASS, 'RotatingBanner');
  if (!count($result)) {
    return FALSE;
  }
  SimpleActiveRecord::runInitialize($result);
  return $result;
}