public function view::copy in Views (for Drupal 7) 7.3
Same name and namespace in other branches
- 6.3 includes/view.inc \view::copy()
- 6.2 includes/view.inc \view::copy()
Make a copy of this view with IDs, handlers sanitized
I'd call this clone() but it's reserved.
File
- includes/
view.inc, line 1998 - views_objects Objects that represent a View or part of a view
Class
- view
- An object to contain all of the data to generate a view.
Code
public function copy() {
$code = $this
->export();
eval($code);
return $view;
}