class views_advanced_labels_plugin_display_extender in Views Advanced Labels 7
Adds advanced label options to all displays.
Hierarchy
- class \views_object
Expanded class hierarchy of views_advanced_labels_plugin_display_extender
1 string reference to 'views_advanced_labels_plugin_display_extender'
- views_advanced_labels_views_plugins in ./
views_advanced_labels.views.inc - Implements hook_views_plugins().
File
- ./
views_advanced_labels_plugin_display_extender.inc, line 11 - Contains views_advanced_labels_plugin_display_extender.
View source
class views_advanced_labels_plugin_display_extender extends views_plugin_display_extender {
/**
* {@inheritdoc}
*/
public function options_definition_alter(&$options) {
$options['label_rewrites'] = array(
'default' => array(),
'unpack_translatable' => 'unpack_translatable_field_options',
);
$options['select_labels'] = array(
'default' => array(),
'translatable' => TRUE,
);
}
/**
* Extracts translatable strings from the "label_rewrites" option.
*
* Set as an "unpack_translatable" callback in options_definition_alter().
*/
public function unpack_translatable_field_options(&$translatable, $storage, $option, $definition, $parents, $keys = array()) {
foreach ($storage[$option] as $field_id => $rewrite) {
$translatable[] = array(
'value' => $rewrite['text'],
'keys' => array_merge($keys, array(
$field_id,
'text',
)),
'format' => NULL,
);
}
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
views_advanced_labels_plugin_display_extender:: |
public | function |
Provide a form to edit options for this plugin. Overrides views_plugin_display_extender:: |
|
views_advanced_labels_plugin_display_extender:: |
public | function | Extracts translatable strings from the "label_rewrites" option. | |
views_object:: |
public | property | Handler's definition. | |
views_object:: |
public | property | Except for displays, options for the object will be held here. | 1 |
views_object:: |
function | Collect this handler's option definition and alter them, ready for use. | ||
views_object:: |
public | function | Views handlers use a special construct function. | 4 |
views_object:: |
public | function | Destructor. | 2 |
views_object:: |
public | function | 1 | |
views_object:: |
public | function | ||
views_object:: |
public | function | Always exports the option, regardless of the default value. | |
views_object:: |
public | function | Set default options on this object. | 1 |
views_object:: |
public | function | Information about options for all kinds of purposes will be held here. | 13 |
views_object:: |
public | function | Set default options. | |
views_object:: |
public | function | Let the handler know what its full definition is. | |
views_object:: |
public | function | Unpack options over our existing defaults, drilling down into arrays so that defaults don't get totally blown away. | |
views_object:: |
public | function | Unpack a single option definition. | |
views_object:: |
public | function | Unpacks each handler to store translatable texts. | |
views_object:: |
public | function | ||
views_plugin:: |
public | property | The current used views display. | |
views_plugin:: |
public | property | The plugin name of this plugin, for example table or full. | |
views_plugin:: |
public | property | The plugin type of this plugin, for example style or query. | |
views_plugin:: |
public | property |
The top object of a view. Overrides views_object:: |
1 |
views_plugin:: |
public | function | Provide a list of additional theme functions for the theme info page. | |
views_plugin:: |
public | function | Return the human readable name of the display. | |
views_plugin:: |
public | function | Returns the summary of the settings in the display. | 8 |
views_plugin:: |
public | function | Provide a full list of possible theme templates used by this style. | |
views_plugin:: |
public | function | Validate that the plugin is correct and can be saved. | 3 |
views_plugin_display_extender:: |
public | function | Static member function to list which sections are defaultable and what items each section contains. | |
views_plugin_display_extender:: |
public | function | ||
views_plugin_display_extender:: |
public | function |
Provide a form to edit options for this plugin. Overrides views_plugin:: |
|
views_plugin_display_extender:: |
public | function |
Handle any special handling on the validate form. Overrides views_plugin:: |
|
views_plugin_display_extender:: |
public | function | Provide the default summary for options in the views UI. | |
views_plugin_display_extender:: |
public | function |
Validate the options form. Overrides views_plugin:: |
|
views_plugin_display_extender:: |
public | function | Set up any variables on the view prior to execution. | |
views_plugin_display_extender:: |
public | function |
Inject anything into the query that the display_extender handler needs. Overrides views_plugin:: |