You are here

function _sheetnode_sheetfield_aliases in Sheetnode 7.2

Same name and namespace in other branches
  1. 6 sheetnode.module \_sheetnode_sheetfield_aliases()
  2. 7 sheetnode.module \_sheetnode_sheetfield_aliases()

Helper function to retrieve possible sheetfield aliases.

3 calls to _sheetnode_sheetfield_aliases()
sheetnode_field_formatter_view in ./sheetnode.module
Implements hook_field_formatter_view().
sheetnode_field_widget_form in ./sheetnode.module
Implements hook_field_widget_form().
sheetnode_node_validate in ./sheetnode.module
Implements hook_node_validate().

File

./sheetnode.module, line 1246
Module file for the sheetnode module.

Code

function _sheetnode_sheetfield_aliases($field_name, $label, $value, $delta) {
  $names = array();
  $names[] = $field_name . '/' . $delta;
  if (!empty($label)) {
    $names[] = $label . '/' . $delta;
  }
  if (!empty($value['name'])) {
    $names[] = $value['name'];
  }
  return $names;
}