FluidTYPO3/flux — pull request #275 by NamelessCoder (2013-08-22 03:01:11+00:00)
Title: [FEATURE] Enable use of Form instances as TCA definition

Usage example:

```
// ext_tables.php
$form = Tx_Flux_Form::create()
->setIcon('ext_icon.gif')
->setExtensionName('myext');
$form->createField('Input', 'myfield')->setDefault('test');
$form->createField('Checkbox', 'mycheckbox');
Tx_Flux_Core::registerFormForTable($form, 'tx_myext_domain_model_myobject');
```

Resulting TCA array now contains a very basic definition, using the first added field as label value.

Icon is a path relative to the extensionName set on the Form instance (uses t3lib_extMgm::extRelPath on extensionKey and appends value used in "icon" directly to this path, resulting in a proper core-compatible icon file path).

Example LLL paths from code above:

```
# main label for table
LLL:EXT:myext/Resources/Private/Language/locallang.xml:flux.tx_myext_domain_model_myobject
# label for field "myfield"
LLL:EXT:myext/Resources/Private/Language/locallang.xml:flux.tx_myext_domain_model_myobject.fields.myfield
```

The SQL schema definition must still be created manually or using extension builder tools.