You are here

function ctools_entity_field_content_type_admin_title in Chaos Tool Suite (ctools) 7

Returns the administrative title for a type.

File

plugins/content_types/entity_context/entity_field.inc, line 281

Code

function ctools_entity_field_content_type_admin_title($subtype, $conf, $context) {
  list($bundle, $field_name) = explode(':', $subtype);
  ctools_include('fields');
  if (is_object($context) && isset($context->identifier)) {
    $identifier = $context->identifier;
  }
  else {
    watchdog('ctools_entity_field_content_type_admin_title', 'Context is missing for field: @name', array(
      '@name' => $subtype,
    ), WATCHDOG_NOTICE);
    $identifier = t('Unknown');
  }
  return t('"@s" @field', array(
    '@s' => $identifier,
    '@field' => ctools_field_label($field_name),
  ));
}