public function SchemaForm::getSchemaForm in Entity Construction Kit (ECK) 7.3
Generate a form api form from the given schema.
Return value
array form api array.
File
- ./
eck.schema.inc, line 53 - A helper class to create schema forms
Class
- SchemaForm
- @file A helper class to create schema forms
Code
public function getSchemaForm() {
$form = array();
foreach ($this->defaultSchema as $property => $value) {
$method_prefix = $this
->stringToCamelCase($property);
$method = "{$method_prefix}FormElement";
if ($property == "not null") {
$property = "not_null";
}
$form[$property] = $this
->{$method}($value);
}
return $form;
}