function view::copy in Views (for Drupal 7) 6.3
Same name and namespace in other branches
- 6.2 includes/view.inc \view::copy()
- 7.3 includes/view.inc \view::copy()
Make a copy of this view that has been sanitized of all database IDs and handlers and other stuff.
I'd call this clone() but it's reserved.
File
Class
- view
- An object to contain all of the data to generate a view, plus the member functions to build the view query, execute the query and render the output.
Code
function copy() {
$code = $this
->export();
eval($code);
return $view;
}