function _button_field_build_id in Button Field 7
Builds the id for a button field instance.
Parameters
array $field: Field info array.
string $mode: Mode that the field will be rendered in (view|edit).
integer $delta: Delta of the instance being rendered.
string $language: Language of the current field.
Return value
string Id to be used for the field.
2 calls to _button_field_build_id()
- button_field_field_formatter_view in ./
button_field.module - Implements hook_field_formatter_view().
- button_field_field_widget_form in ./
button_field.module - Implements hook_field_widget_form().
File
- ./
button_field.module, line 458 - Defines a field, widget and formatter for the button field type.
Code
function _button_field_build_id($field, $mode = 'edit', $delta = 0, $language = LANGUAGE_NONE) {
$parts = array(
$mode,
str_replace('_', '-', $field['field_name']),
$language,
$delta,
'value',
);
return implode('-', $parts);
}