protected function SchemaForm::sizeFormElement in Entity Construction Kit (ECK) 7.3
Schmea form section for schema size.
Parameters
string $value: The current value
Return value
array form api array piece.
File
- ./
eck.schema.inc, line 115 - A helper class to create schema forms
Class
- SchemaForm
- @file A helper class to create schema forms
Code
protected function sizeFormElement($value) {
$key = "size";
$options = array(
'tiny' => 'tiny',
'small' => 'small',
'medium' => 'medium',
'normal' => 'normal',
'big' => 'big',
);
$element = array(
'#title' => t('Size'),
'#type' => 'select',
'#options' => $options,
'#default_value' => $value,
'#disabled' => array_key_exists($key, $this->lockedProperties) ? $this->lockedProperties[$key] : FALSE,
);
return $element;
}