Full ELMS Learning Network documentation
function views_plugin_display::export_option
cis7 views_plugin_display.inc | views_plugin_display::export_option($indent, $prefix, $storage, $option, $definition, $parents) |
cle7 views_plugin_display.inc | views_plugin_display::export_option($indent, $prefix, $storage, $option, $definition, $parents) |
elmsmedia7 views_plugin_display.inc | views_plugin_display::export_option($indent, $prefix, $storage, $option, $definition, $parents) |
icor7 views_plugin_display.inc | views_plugin_display::export_option($indent, $prefix, $storage, $option, $definition, $parents) |
meedjum_blog7 views_plugin_display.inc | views_plugin_display::export_option($indent, $prefix, $storage, $option, $definition, $parents) |
mooc7 views_plugin_display.inc | views_plugin_display::export_option($indent, $prefix, $storage, $option, $definition, $parents) |
Override of export_option()
Because displays do not want to export options that are NOT overridden from the default display, we need some special handling during the export process.
File
- sites/
all/ modules/ ulmus/ views/ plugins/ views_plugin_display.inc, line 2820 - Contains the base display plugin.
Class
- views_plugin_display
- The default display plugin handler. Display plugins handle options and basic mechanisms for different output methods.
Code
function export_option($indent, $prefix, $storage, $option, $definition, $parents) {
// The $prefix is wrong because we store our actual options a little differently:
$prefix = '$handler->display->display_options';
$output = '';
if (!$parents && !$this->is_default_display()) {
// Do not export items that are not overridden.
if ($this->is_defaulted($option)) {
return;
}
// If this is not defaulted and is overrideable, flip the switch to say this
// is overridden.
if ($this->defaultable_sections($option)) {
$output .= $indent . $prefix . "['defaults']['$option'] = FALSE;\n";
}
}
$output .= parent::export_option($indent, $prefix, $storage, $option, $definition, $parents);
return $output;
}