You are here

public function ProtectedPagesStorage::loadAllProtectedPages in Protected Pages 8

Fetches all protected pages records from database.

File

src/ProtectedPagesStorage.php, line 132

Class

ProtectedPagesStorage
Defines the protected page storage service.

Namespace

Drupal\protected_pages

Code

public function loadAllProtectedPages() {
  $results = $this->connection
    ->select('protected_pages', 'p')
    ->extend('Drupal\\Core\\Database\\Query\\PagerSelectExtender')
    ->fields('p')
    ->orderBy('p.pid', 'DESC')
    ->limit(20)
    ->execute()
    ->fetchAll();
  return $results;
}