Commit 5049a8ab authored by David Metzler's avatar David Metzler
Browse files

Change mode fixes.

parent 6cc9e242
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -211,7 +211,10 @@ class FrxBlockEditor {
$_SESSION['forena_data_block_parms'][$this->block_name] = $parms;
}
public function builderList() {
/**
* Instantiate the builders if necessary
*/
public function getBuilders() {
if (!$this->builders) {
$this->builders = array();
$builders = module_invoke_all('forena_query_builders');
......@@ -223,6 +226,10 @@ class FrxBlockEditor {
}
}
}
}
public function builderList() {
$this->getBuilders();
$r = Frx::RepoMan()->repository($this->provider);
$plugin = get_class($r);
$list = array();
......@@ -235,4 +242,58 @@ class FrxBlockEditor {
return $list;
}
/**
* Use the classes configForm method to build the form.
* @param $builder
* @param $config
* @return multitype:
*/
public function configForm($builder, &$config) {
$this->getBuilders();
$form = array();
if (isset($this->builders[$builder])) {
$b = $this->builders[$builder];
if (method_exists($b, 'configForm')) {
$form = $b->configForm($config);
}
}
return $form;
}
/**
* Use the classes generate method to generate the block.
* @param $builder
* @param $config
* @return multitype:
*/
public function generate($builder, &$config) {
$this->getBuilders();
$form = array();
if (isset($this->builders[$builder])) {
$b = $this->builders[$builder];
if (method_exists($b, 'generate')) {
$form = $b->generate($config);
}
}
return $form;
}
/**
* Use the classes validate method to validate the block.
* @param $builder
* @param $config
* @return multitype:
*/
public function configValidate($builder, &$config) {
$this->getBuilders();
$errors = array();
if (isset($this->builders[$builder])) {
$b = $this->builders[$builder];
if (method_exists($b, 'configValidate')) {
$errors = $b->configForm($config);
}
}
return $errors;
}
}
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -33,7 +33,7 @@ class FrxQueryBuilder {
'#description' => t('Value depends on the security for the data block,
but for drupal data, this is a right as defined by the module provided. '),
'#type' => 'textfield',
'#disabled' => !user_access('forena data security'),
'#access' => user_access('forena data security'),
'#default_value' => @$block['access'],
);
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment