Flex: Improve copy logic

This commit is contained in:
Matias Griese
2019-08-28 14:12:02 +03:00
parent 46975cca22
commit 53b7c95b0d
2 changed files with 8 additions and 3 deletions

View File

@@ -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()
{

View File

@@ -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);
}
/**