public function CmisQueryForm::queryExec in CMIS API 8
Same name and namespace in other branches
- 8.2 src/Form/CmisQueryForm.php \Drupal\cmis\Form\CmisQueryForm::queryExec()
- 3.0.x src/Form/CmisQueryForm.php \Drupal\cmis\Form\CmisQueryForm::queryExec()
Execute query string.
Parameters
string $config:
string $query:
Return value
string
1 call to CmisQueryForm::queryExec()
- CmisQueryForm::buildForm in src/
Form/ CmisQueryForm.php - Form constructor.
File
- src/
Form/ CmisQueryForm.php, line 121
Class
- CmisQueryForm
- Class CmisQueryForm.
Namespace
Drupal\cmis\FormCode
public function queryExec($config = '', $query = '') {
$content = '';
if (empty($config)) {
if (!empty($this->config)) {
$config = $this->config;
}
else {
return $content;
}
}
if (!empty($query)) {
$this->connection
->setDefaultParameters();
$session = $this->connection
->getSession();
$results = $session
->query($query);
$content = $this
->prepareResult($results, $query);
}
return $content;
}