public function BlockEditor::configValidate in Forena Reports 7.5
Same name and namespace in other branches
- 8 src/Editor/BlockEditor.php \Drupal\forena\Editor\BlockEditor::configValidate()
Use the classes validate method to validate the block.
Parameters
$builder:
$config:
Return value
multitype:
File
- src/
Editor/ BlockEditor.php, line 308
Class
Namespace
Drupal\forena\EditorCode
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
->configValidate($config);
}
if ($errors) {
foreach ($errors as $name => $error) {
form_set_error($name, $error);
}
}
}
return $errors;
}