'language' => !empty($data['language']) ? $data['language'] : $entry->getLanguage(),
'date' => !empty($data['publishedAt']) ? $data['publishedAt'] : $entry->getPublishedAt(),
// faking the open graph preview picture
- 'open_graph' => [
- 'og_image' => !empty($data['picture']) ? $data['picture'] : $entry->getPreviewPicture(),
- ],
+ 'image' => !empty($data['picture']) ? $data['picture'] : $entry->getPreviewPicture(),
'authors' => \is_string($data['authors']) ? explode(',', $data['authors']) : $entry->getPublishedBy(),
]
);
}
// if refreshing entry failed, don't save it
- if ($this->getParameter('wallabag_core.fetching_error_message') === $entry->getContent()) {
+ if ($this->container->getParameter('wallabag_core.fetching_error_message') === $entry->getContent()) {
return new JsonResponse([], 304);
}
* Retrieve value from the request.
* Used for POST & PATCH on a an entry.
*
- * @param Request $request
- *
* @return array
*/
private function retrieveValueFromRequest(Request $request)
/**
* Return information about the entry if it exist and depending on the id or not.
*
- * @param Entry|null $entry
- * @param bool $returnId
+ * @param Entry|bool|null $entry
+ * @param bool $returnId
*
* @return bool|int
*/