You are here

function sheetnode_plugin_style::find_field in Sheetnode 7

Same name and namespace in other branches
  1. 6 views/sheetnode_plugin_style.inc \sheetnode_plugin_style::find_field()
  2. 7.2 views/sheetnode_plugin_style.inc \sheetnode_plugin_style::find_field()
1 call to sheetnode_plugin_style::find_field()
sheetnode_plugin_style::render_sheet in views/sheetnode_plugin_style.inc

File

views/sheetnode_plugin_style.inc, line 516

Class

sheetnode_plugin_style

Code

function find_field($field_name) {
  if (isset($this->view->field[$field_name])) {
    return $field_name;
  }
  foreach ($this->view->field as $field => $info) {
    if ($info->field_alias == $field_name) {
      return $field;
    }
    if (strcasecmp($info
      ->label(), $field_name) == 0) {
      return $field;
    }
    if (method_exists($info, 'ui_name') && strcasecmp($info
      ->ui_name(), $field_name) == 0) {
      return $field;
    }
  }
  return FALSE;
}