src/DcGeneral/Data/Driver.php
public function save(ModelInterface $objItem, $timestamp = null)
    {
        if (null === $timestamp) {
            // @codingStandardsIgnoreStart
            @\trigger_error(
                'Not passing a timestamp has been deprecated and will cause an error in MetaModels 3',
                E_USER_DEPRECATED
            );
            // @codingStandardsIgnoreEnd
        }

        if ($objItem instanceof Model) {
            $backupLanguage = $this->setLanguage($this->getCurrentLanguage());

            $objItem->getItem()->save($timestamp);

            $this->setLanguage($backupLanguage);

            return $objItem;
        }

        throw new \RuntimeException('ERROR: incompatible object passed to GeneralDataMetaModel::save()');
    }
public function save(ModelInterface $objItem, $timestamp = null)
    {
        if (null === $timestamp) {
            // @codingStandardsIgnoreStart
            @\trigger_error(
                'Not passing a timestamp has been deprecated and will cause an error in MetaModels 3',
                E_USER_DEPRECATED
            );
            // @codingStandardsIgnoreEnd
        }

        if ($objItem instanceof Model) {
            $backupLanguage = $this->setLanguage($this->getCurrentLanguage());

            $objItem->getItem()->save($timestamp);

            $this->setLanguage($backupLanguage);

            return $objItem;
        }

        throw new \RuntimeException('ERROR: incompatible object passed to GeneralDataMetaModel::save()');
    }
Save an item to the data provider.

If the item does not have an Id yet, the save operation will add it as a new row to the database and
populate the Id of the model accordingly.

@param ModelInterface $objItem   The model to save back.

@param int|null            $timestamp Optional the timestamp.

@return ModelInterface The passed model.

@throws \RuntimeException When an incompatible item was passed, an Exception is being thrown.