+
+ /**
+ * Retrieve value from the request.
+ * Used for POST & PATCH on a an entry.
+ *
+ * @param Request $request
+ *
+ * @return array
+ */
+ private function retrieveValueFromRequest(Request $request)
+ {
+ return [
+ 'title' => $request->request->get('title'),
+ 'tags' => $request->request->get('tags', []),
+ 'isArchived' => $request->request->get('archive'),
+ 'isStarred' => $request->request->get('starred'),
+ 'isPublic' => $request->request->get('public'),
+ 'content' => $request->request->get('content'),
+ 'language' => $request->request->get('language'),
+ 'picture' => $request->request->get('preview_picture'),
+ 'publishedAt' => $request->request->get('published_at'),
+ 'authors' => $request->request->get('authors', ''),
+ ];
+ }
+
+ /**
+ * Return information about the entry if it exist and depending on the id or not.
+ *
+ * @param Entry|null $entry
+ * @param bool $returnId
+ *
+ * @return bool|int
+ */
+ private function returnExistInformation($entry, $returnId)
+ {
+ if ($returnId) {
+ return $entry instanceof Entry ? $entry->getId() : null;
+ }
+
+ return $entry instanceof Entry;
+ }