return true;
}
+ /**
+ * {@inheritdoc}
+ */
+ public function validateEntry(array $importedEntry)
+ {
+ if (empty($importedEntry['href'])) {
+ return false;
+ }
+
+ return true;
+ }
+
/**
* {@inheritdoc}
*/
$data = [
'title' => $importedEntry['description'],
'url' => $importedEntry['href'],
- 'content_type' => '',
- 'language' => '',
'is_archived' => ('no' === $importedEntry['toread']) || $this->markAsRead,
'is_starred' => false,
'created_at' => $importedEntry['time'],
$entry->setTitle($data['title']);
// update entry with content (in case fetching failed, the given entry will be return)
- $entry = $this->fetchContent($entry, $data['url'], $data);
+ $this->fetchContent($entry, $data['url'], $data);
if (!empty($data['tags'])) {
- $this->contentProxy->assignTagsToEntry(
+ $this->tagsAssigner->assignTagsToEntry(
$entry,
$data['tags'],
$this->em->getUnitOfWork()->getScheduledEntityInsertions()
);
}
- $entry->setArchived($data['is_archived']);
+ $entry->updateArchived($data['is_archived']);
$entry->setStarred($data['is_starred']);
$entry->setCreatedAt(new \DateTime($data['created_at']));