You are here

public function DriverBase::listDBBlocks in Forena Reports 8

@TODO: Determine whether we still need this.

Parameters

$search:

$data_blocks:

1 call to DriverBase::listDBBlocks()
DriverBase::listDataBlocks in src/FrxPlugin/Driver/DriverBase.php
Find all the blocks matching a provided search string

File

src/FrxPlugin/Driver/DriverBase.php, line 171
Class that defines default methods for access control in an DriverBase

Class

DriverBase

Namespace

Drupal\forena\FrxPlugin\Driver

Code

public function listDBBlocks($search, &$data_blocks) {
  $search = '%' . $search . '%';
  $sql = 'SELECT * from {forena_data_blocks} WHERE repository=:repos
      AND block_name like :search ';
  $rs = db_query($sql, array(
    ':repos' => $this->name,
    ':search' => $search,
  ));
  foreach ($rs as $block) {
    $data_blocks[] = $block->block_name;
  }
}