mirror of
https://github.com/getgrav/grav.git
synced 2026-07-06 13:59:14 +02:00
Flex: Improve copy logic
This commit is contained in:
@@ -2819,7 +2819,7 @@ class Page implements PageInterface
|
||||
/**
|
||||
* Gets the action.
|
||||
*
|
||||
* @return string The Action string.
|
||||
* @return string|null The Action string.
|
||||
*/
|
||||
public function getAction()
|
||||
{
|
||||
|
||||
@@ -591,12 +591,17 @@ class FlexObject implements FlexObjectInterface, FlexAuthorizeInterface
|
||||
* @return FlexObject|FlexObjectInterface
|
||||
*/
|
||||
public function createCopy(string $key = null)
|
||||
{
|
||||
$this->markAsCopy();
|
||||
|
||||
return $this->create($key);
|
||||
}
|
||||
|
||||
protected function markAsCopy()
|
||||
{
|
||||
$meta = $this->getMetaData();
|
||||
$meta['copy'] = true;
|
||||
$this->_meta = $meta;
|
||||
|
||||
return $this->create($key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user