function blockreference_options_list in Block reference 7
Same name and namespace in other branches
- 7.2 blockreference.module \blockreference_options_list()
Implements hook_options_list().
File
- ./
blockreference.module, line 678 - Defines a field type for referencing a block from a node.
Code
function blockreference_options_list($field, $instance, $entity_type, $entity) {
$current_bids = array();
if (!empty($entity->{$field['field_name']})) {
foreach ($entity->{$field['field_name']} as $language) {
foreach ($language as $delta) {
$current_bids[] = $delta;
}
}
}
return _blockreference_potential_references($field, $current_bids);
}