function views_var_export

cis7 views.module views_var_export($var, $prefix = '', $init = TRUE)
cle7 views.module views_var_export($var, $prefix = '', $init = TRUE)
elmsmedia7 views.module views_var_export($var, $prefix = '', $init = TRUE)
icor7 views.module views_var_export($var, $prefix = '', $init = TRUE)
meedjum_blog7 views.module views_var_export($var, $prefix = '', $init = TRUE)
mooc7 views.module views_var_export($var, $prefix = '', $init = TRUE)

Export a field.

2 calls to views_var_export()
views_handler_filter_in_operator::validate in sites/all/modules/ulmus/views/handlers/views_handler_filter_in_operator.inc
Validates the handler against the complete View.
views_object::export_option in sites/all/modules/ulmus/views/includes/base.inc

File

sites/all/modules/ulmus/views/views.module, line 2253
Primarily Drupal hooks and global API functions to manipulate views.

Code

function views_var_export($var, $prefix = '', $init = TRUE) {
  if (is_array($var)) {
    if (empty($var)) {
      $output = 'array()';
    }
    else {
      $output = "array(\n";
      foreach ($var as $key => $value) {
        $output .= "  " . views_var_export($key, '', FALSE) . " => " . views_var_export($value, '  ', FALSE) . ",\n";
      }
      $output .= ')';
    }
  }
  elseif (is_bool($var)) {
    $output = $var ? 'TRUE' : 'FALSE';
  }
  elseif (is_string($var) && strpos($var, "\n") !== FALSE) {
    // Replace line breaks in strings with a token for replacement
    // at the very end. This protects multi-line strings from
    // unintentional indentation.
    $var = str_replace("\n", "***BREAK***", $var);
    $output = var_export($var, TRUE);
  }
  else {
    $output = var_export($var, TRUE);
  }

  if ($prefix) {
    $output = str_replace("\n", "\n$prefix", $output);
  }

  if ($init) {
    $output = str_replace("***BREAK***", "\n", $output);
  }

  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.