You are here

protected function SchemaForm::lengthFormElement in Entity Construction Kit (ECK) 7.3

Schmea form section for schema length.

Parameters

string $value: The current value

Return value

array form api array piece.

File

./eck.schema.inc, line 208
A helper class to create schema forms

Class

SchemaForm
@file A helper class to create schema forms

Code

protected function lengthFormElement($value) {
  $key = "default";
  $element = array(
    '#title' => t('Length'),
    '#type' => 'textfield',
    '#default_value' => $value,
    '#disabled' => array_key_exists($key, $this->lockedProperties) ? $this->lockedProperties[$key] : FALSE,
  );
  return $element;
}