You are here

function slickgrid_views_plugin::entity_label_field in Slickgrid 7.2

1 call to slickgrid_views_plugin::entity_label_field()
slickgrid_views_plugin::options_form in includes/slickgrid_views_plugin.inc
Add settings for the particular slickgrid.

File

includes/slickgrid_views_plugin.inc, line 547

Class

slickgrid_views_plugin
Extending the view_plugin_style class to provide a slickgrid style.

Code

function entity_label_field($field) {
  static $entity_labels = array();
  if (!count($entity_labels)) {
    foreach ($entities_info = entity_get_info() as $entity_info) {
      $entity_labels[$entity_info['base table']] = $entity_info['entity keys']['label'];
    }
  }
  if (array_key_exists($field->options['table'], $entity_labels) && $entity_labels[$field->options['table']] == $field->options['field']) {
    return true;
  }
}