You are here

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

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

Load single popup from table with pid.

1 call to SimplePopupBlocksStorage::load()
SimplePopupBlocksEditForm::buildForm in src/Form/SimplePopupBlocksEditForm.php
Form constructor.

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();
}