function views_handler_field::get_elements

Same name in other branches
  1. 7.x-3.x handlers/views_handler_field.inc \views_handler_field::get_elements()

Provide a list of elements valid for field HTML.

This function can be overridden by fields that want more or fewer elements available, though this seems like it would be an incredibly rare occurence.

1 call to views_handler_field::get_elements()
views_handler_field::options_form in handlers/views_handler_field.inc
Default options form that provides the label widget that all fields should have.

File

handlers/views_handler_field.inc, line 223

Class

views_handler_field
Base field handler that has no options and renders an unformatted field.

Code

function get_elements() {
    static $elements = NULL;
    if (!isset($elements)) {
        $elements = variable_get('views_field_rewrite_elements', array(
            '' => t('- Use default -'),
            '0' => t('- None -'),
            'div' => 'DIV',
            'span' => 'SPAN',
            'h1' => 'H1',
            'h2' => 'H2',
            'h3' => 'H3',
            'h4' => 'H4',
            'h5' => 'H5',
            'h6' => 'H6',
            'p' => 'P',
            'strong' => 'STRONG',
            'em' => 'EM',
        ));
    }
    return $elements;
}