You are here

public function CarouselItemStorage::getCarouselItems in bootstrap simple carousel 8

Returns all active carousel items.

File

src/CarouselItemStorage.php, line 27

Class

CarouselItemStorage
Carousel Item storage.

Namespace

Drupal\bootstrap_simple_carousel

Code

public function getCarouselItems() {
  $query = $this->database
    ->select($this
    ->getBaseTable(), 'u');
  $query
    ->fields('u');
  $query
    ->condition('status', 1);
  $query
    ->orderBy('weight', 'DESC');
  return $query
    ->execute()
    ->fetchAll();
}