public function saveLink($linkData)
    {
        $connection = $this->getConnection();

        if (isset($linkData['delete_after']) && ($linkData['delete_after'] instanceof \DateTime)) {
            $linkData['delete_after'] = $this->formatDate($linkData['delete_after']);
        }

        $connection->insertOnDuplicate(
            $this->getMainTable(),
            $linkData,
            array_keys($linkData)
        );
    }