You are here

public static function SimplePopupBlocksStorage::load in Simple Popup Blocks 8.2

Same name and namespace in other branches
  1. 8 src/SimplePopupBlocksStorage.php \Drupal\simple_popup_blocks\SimplePopupBlocksStorage::load()

Load single popup from table with pid.

File

src/SimplePopupBlocksStorage.php, line 91

Class

SimplePopupBlocksStorage
Class SimplePopupBlocksStorage.

Namespace

Drupal\simple_popup_blocks

Code

public static function load($pid, Connection $database) {
  $select = $database
    ->select('simple_popup_blocks', 'pb');
  $select
    ->fields('pb');
  $select
    ->condition('pid', $pid);

  // Return the result in object format.
  return $select
    ->execute()
    ->fetchAll();
}