You are here

function hook_field_token_value_wrapper_info in Field Token Value 7

Provide a wrapper to the field formatter for the field_token_value field.

Return value

array A keyed array containing information for the wrapper.

1 function implements hook_field_token_value_wrapper_info()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

field_token_value_field_token_value_wrapper_info in ./field_token_value.module
Implements hook_field_token_value_wrapper_info().
1 invocation of hook_field_token_value_wrapper_info()
field_token_value_get_wrappers in ./field_token_value.module
Helper function to aggregate all wrapper options for the field formatter.

File

./field_token_value.api.php, line 19
Contains hooks provided by the Field Token Value module.

Code

function hook_field_token_value_wrapper_info() {
  return array(
    'p' => array(
      // The title used within the select list. This is required.
      'title' => t('Paragraph'),
      // A summary of the wrapper to display as the field formatter summary.
      // This is optional and a default summary will be displayed if not set.
      'summary' => t('The value will be wrapped in a paragraph tag.'),
      // The HTML tag to be passed to the html_tag element. This is required.
      'tag' => 'p',
      // An array of HTML attributed as passed to the html_tag element.
      // @see theme_html_tag().
      'attributes' => array(
        'class' => array(
          'my-paragraph',
        ),
      ),
    ),
  );
}