MetaModels\Item::copy PHP Метод

copy() публичный Метод

This is useful when creating new items that shall be based upon another item.
public copy ( ) : metamodels\IItem
Результат metamodels\IItem the new copy.
    public function copy()
    {
        // Fetch data, clean undesired fields and return the new item.
        $arrNewData = $this->arrData;
        unset($arrNewData['id']);
        unset($arrNewData['tstamp']);
        return new Item($this->getMetaModel(), $arrNewData);
    }