You are here

public function FrxBlockEditor::tokens in Forena Reports 7.4

Return the tokens for the block.

File

./FrxBlockEditor.inc, line 208

Class

FrxBlockEditor

Code

public function tokens() {

  // skip non-sql blocks
  if (!isset($this->block['file'])) {
    return array();
  }
  $block = Frx::RepoMan()
    ->sqlBlock($this->provider, $this->block['file']);
  $tokens = @$block['tokens'];
  $c_idx = array_search('current_user', $tokens);
  if ($c_idx !== FALSE) {
    unset($tokens[$c_idx]);
  }
  return $tokens;
}