function editableviews_plugin_style_row_edit_table::get_form in Editable Views 7
Helper method. Retrieves the form render array.
Parameters
$entities: An array of entities to get the form for, keyed first by entity type and then by entity id.
$results_coordinates: An array containing coordinates lookups for getting entity type and entity from row id and relationship, and the same the other way round. Contains:
- 'entities_to_results': A nested array keyed by entity type then entity id. The final values are flat arrays of the relationship id and result index.
- 'results_to_entities': A nested array keyed by relationship id then result index. The final values are flat arrays of the entity type and entity id.
$edit_field_handlers: An array of field handlers to provide form elements for, grouped by their relationship. See editableviews_entity_form() for details.
1 call to editableviews_plugin_style_row_edit_table::get_form()
- editableviews_plugin_style_row_edit_table::insert_form_elements in ./
editableviews_plugin_style_row_edit_table.inc - Insert the field form elements into the rendered View fields.
File
- ./
editableviews_plugin_style_row_edit_table.inc, line 312
Class
- editableviews_plugin_style_row_edit_table
- Plugin class for the Editable Table style.
Code
function get_form($entities, $results_coordinates, $edit_field_handlers) {
// Create a dynamic form ID using the base name (for quick recognition
// in hook_forms()) and the view name. This allows hook_form_alter() to
// target forms for specific views. We don't add the display name as there's
// no clean way to mark the separation between that and the view name.
// @see editableviews_forms()
$form_id = 'editableviews_entity_form' . '_' . $this->view->name;
// We store this rather than return it, as it's used in different places.
$this->form = drupal_get_form($form_id, $entities, $results_coordinates, $edit_field_handlers, $this->view);
}