mirror of
https://github.com/getgrav/grav.git
synced 2026-05-07 18:25:37 +02:00
Added a copy() method on collections
This commit is contained in:
@@ -35,6 +35,17 @@ class Collection extends Iterator
|
||||
return $this->params;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Create a copy of this collection
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function copy()
|
||||
{
|
||||
return new static($this->items, $this->params, $this->pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set parameters to the Collection
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user