function views_object::export_option

cis7 base.inc views_object::export_option($indent, $prefix, $storage, $option, $definition, $parents)
cle7 base.inc views_object::export_option($indent, $prefix, $storage, $option, $definition, $parents)
elmsmedia7 base.inc views_object::export_option($indent, $prefix, $storage, $option, $definition, $parents)
icor7 base.inc views_object::export_option($indent, $prefix, $storage, $option, $definition, $parents)
meedjum_blog7 base.inc views_object::export_option($indent, $prefix, $storage, $option, $definition, $parents)
mooc7 base.inc views_object::export_option($indent, $prefix, $storage, $option, $definition, $parents)
2 calls to views_object::export_option()
views_object::export_options in sites/all/modules/ulmus/views/includes/base.inc
views_object::export_option_always in sites/all/modules/ulmus/views/includes/base.inc
Always exports the option, regardless of the default value.

File

sites/all/modules/ulmus/views/includes/base.inc, line 212
Provides the basic object definitions used by plugins and handlers.

Class

views_object
Basic definition for many views objects.

Code

function export_option($indent, $prefix, $storage, $option, $definition, $parents) {
  // Do not export options for which we have no settings.
  if (!isset($storage[$option])) {
    return;
  }

  if (isset($definition['export'])) {
    if ($definition['export'] === FALSE) {
      return;
    }

    // Special handling for some items
    if (method_exists($this, $definition['export'])) {
      return $this->{$definition['export']}($indent, $prefix, $storage, $option, $definition, $parents);
    }
  }

  // Add the current option to the parents tree.
  $parents[] = $option;
  $output = '';

  // If it has child items, export those separately.
  if (isset($definition['contains'])) {
    foreach ($definition['contains'] as $sub_option => $sub_definition) {
      $output .= $this->export_option($indent, $prefix, $storage[$option], $sub_option, $sub_definition, $parents);
    }
  }
  // Otherwise export just this item.
  else {
    $default = isset($definition['default']) ? $definition['default'] : NULL;
    $value = $storage[$option];
    if (isset($definition['bool'])) {
      $value = (bool) $value;
    }

    if ($value !== $default) {
      $output .= $indent . $prefix . "['" . implode("']['", $parents) . "'] = ";
      if (isset($definition['bool'])) {
        $output .= empty($storage[$option]) ? 'FALSE' : 'TRUE';
      }
      else {
        $output .= views_var_export($storage[$option], $indent);
      }

      $output .= ";\n";
    }
  }
  return $output;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.