function entity_table_select in Entity Construction Kit (ECK) 7
Same name and namespace in other branches
- 7.3 eck.module \entity_table_select()
- 7.2 eck.module \entity_table_select()
Helper function for the entities_table. This function creates a select table.
Parameters
$form: A form arrary as returned by drupal_get_form
$state: The form state, this is also provided by the Form API
$enttiy_type: (String) the type of the entities that will be in the table
$bundle: (String) The bundle of the entity that will be in the table
$header: An array for the table header for more info look at theme_table
$rows: The rows of the table for more info on what this should look like look at theme_table
1 string reference to 'entity_table_select'
- eck_forms in ./
eck.module
File
- ./
eck.module, line 251 - ENTITY CONSTRUCTION KIT
Code
function entity_table_select($form, &$state, $entity_type, $bundle, $header, $rows) {
$form['entity_type'] = array(
'#type' => 'value',
'#value' => $entity_type,
);
$form['bundle'] = array(
'#type' => 'value',
'#value' => $bundle,
);
$form['entity_table'] = array(
// '#theme' => 'table',
'#type' => 'tableselect',
'#header' => $header,
'#options' => $rows,
);
return $form;
}