You are here

function content_handler_field::label in Content Construction Kit (CCK) 6.3

Same name and namespace in other branches
  1. 6.2 includes/views/handlers/content_handler_field.inc \content_handler_field::label()

@TODO Now that we save the label in the submit process above we could get rid of this function. Leave it here for now to be sure the label works for fields that haven't been updated since this change was made, since $this->options['label'] will be missing a value until it is updated in the view.

Don't use t(), since Views' views_handler_field already has $this->options['label'] marked as a translatable field.

File

includes/views/handlers/content_handler_field.inc, line 124
The subclass adds basic field and formatter info, for field-specific subclasses to use if they need to.

Class

content_handler_field
@file The subclass adds basic field and formatter info, for field-specific subclasses to use if they need to.

Code

function label() {
  $field = $this->content_field;
  switch ($this->options['label_type']) {
    case 'none':
      return '';
    case 'widget':
      return $field['widget']['label'];
    default:
      return $this->options['label'];
  }
}