Pimcore\Db\PhpArrayFileTable::insertOrUpdate PHP Method

insertOrUpdate() public method

public insertOrUpdate ( $data, string | integer $id = null )
$data
$id string | integer
    public function insertOrUpdate($data, $id = null)
    {
        if (!$id) {
            $id = $this->getNextId();
        }
        $data["id"] = $id;
        $this->data[$id] = $data;
        $this->save();
        $this->lastInsertId = $id;
    }