You are here

function entityreference_rendered_widget_default_values in Entityreference Rendered Widget 7

Get Default values of items.

Parameters

array $items: (Optional) Saved items.

Return value

array Default values.

1 call to entityreference_rendered_widget_default_values()
entityreference_rendered_widget_checkbox_default_value in ./entityreference_rendered_widget.module
Return default value of checkbox.

File

./entityreference_rendered_widget.module, line 229
Entityreference Rendered Widget module.

Code

function entityreference_rendered_widget_default_values(array $items = array()) {
  $default_values = array();
  foreach ($items as $record) {
    $default_values[] = $record['target_id'];
  }
  return drupal_map_assoc($default_values);
}