Skip to content

Instantly share code, notes, and snippets.

@amitaibu
Last active December 14, 2015 05:49
Show Gist options
  • Save amitaibu/5037670 to your computer and use it in GitHub Desktop.
Save amitaibu/5037670 to your computer and use it in GitHub Desktop.
Print the View's query,
$query = $this->view->build_info['query'];
$output = ((string)$query);
foreach ($query->getArguments() as $key => $value) {
$output = str_replace($key, '"' . $value. '"', $output);
}
$output = str_replace(array('{', '}'), '', $output);
dpm($output);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment