FOF30\Model\DataModel\RelationManager::__clone PHP Method

__clone() public method

Implements deep cloning of the relation object
public __clone ( )
    function __clone()
    {
        $relations = array();
        if (!empty($this->relations)) {
            /** @var Relation[] $relations */
            foreach ($this->relations as $key => $relation) {
                $relations[$key] = clone $relation;
                $relations[$key]->reset();
            }
        }
        $this->relations = $relations;
    }