class views_custom_conditions_plugin_display_extender_code in Views Custom Conditions 7
The plugin that added additional setting to views edit form.
Hierarchy
- class \views_object
Expanded class hierarchy of views_custom_conditions_plugin_display_extender_code
1 string reference to 'views_custom_conditions_plugin_display_extender_code'
File
- ./
views_custom_conditions_plugin_display_extender_code.inc, line 12 - Contains the class to extend views display plugins browse all link.
View source
class views_custom_conditions_plugin_display_extender_code extends views_plugin_display_extender {
// Provide a form to edit options for this plugin.
function options_definition() {
$options['views_custom_conditions'] = array(
'default' => '',
);
}
/**
* Provide the form to set new option.
*/
function options_form(&$form, &$form_state) {
switch ($form_state['section']) {
case 'views_custom_conditions':
$form['#title'] .= t('Setting');
$form['views_custom_conditions'] = array(
'#type' => 'textarea',
'#description' => t('Please enter table,field,desired match value and operator name saprated by "|" symbol. eg:- A). node|title|%2%|LIKE,B). users|uid|arg1,arg2,arg3|IN. Please use next line for multiple index.'),
'#default_value' => $this->display
->get_option('views_custom_conditions'),
);
break;
}
}
/**
* Inserts the code into the view display.
*/
function options_submit(&$form, &$form_state) {
// Not sure I like this being here, but it seems (?) like a logical place.
$new_option = $form_state['values']['views_custom_conditions'];
variable_set('views_custom_conditions_' . $form_state['view']->current_display . '_' . $form_state['view']->name, $new_option);
switch ($form_state['section']) {
case 'views_custom_conditions':
variable_set('views_custom_conditions_' . $form_state['values']['override']['dropdown'], $new_option);
wr($form_state['values']['override']);
if ($form_state['values']['override']['dropdown'] == 'default') {
variable_set('views_custom_conditions_' . $form_state['view']->current_display . '_' . $form_state['view']->name, '');
}
$this->display
->set_option('views_custom_conditions', $new_option);
$empty = trim($new_option);
$empty = empty($empty);
break;
}
foreach ($this->extender as $extender) {
$extender
->options_submit($form, $form_state);
}
}
/**
* Summarizes new option.
*
* Lists the fields as either 'Yes' if there is text or 'None' otherwise and
* categorizes the fields under the 'Other' category.
*/
function options_summary(&$categories, &$options) {
$new_option = check_plain(trim($this->display
->get_option('views_custom_conditions')));
if ($new_option) {
$new_option = t('Set');
}
else {
$new_option = t('Not Set');
}
$options['views_custom_conditions'] = array(
'category' => 'other',
'title' => t('Views Custom Conditions'),
'value' => $new_option,
'desc' => t('Add some option.'),
);
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
views_custom_conditions_plugin_display_extender_code:: |
function | |||
views_custom_conditions_plugin_display_extender_code:: |
function |
Provide the form to set new option. Overrides views_plugin_display_extender:: |
||
views_custom_conditions_plugin_display_extender_code:: |
function |
Inserts the code into the view display. Overrides views_plugin_display_extender:: |
||
views_custom_conditions_plugin_display_extender_code:: |
function |
Summarizes new option. Overrides views_plugin_display_extender:: |
||
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. | |
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:: |