public function BlockEditor::tokens in Forena Reports 7.5
Same name and namespace in other branches
- 8 src/Editor/BlockEditor.php \Drupal\forena\Editor\BlockEditor::tokens()
Return the tokens for the block.
File
- src/
Editor/ BlockEditor.php, line 210
Class
Namespace
Drupal\forena\EditorCode
public function tokens() {
// skip non-sql blocks
if (!isset($this->block['file'])) {
return array();
}
$block = Frx::DataManager()
->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;
}