You are here

function sheetnode_plugin_style::find_field in Sheetnode 7.2

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

Find sheetnode fields.

1 call to sheetnode_plugin_style::find_field()
sheetnode_plugin_style::render_sheet in views/sheetnode_plugin_style.inc
Render views plugin style.

File

views/sheetnode_plugin_style.inc, line 567

Class

sheetnode_plugin_style
Extentions for 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;
}