+ /**
+ * Sets the author for one entry or category.
+ *
+ * The publishers are used, or the domain name if empty.
+ *
+ * @param string $method Method to get articles
+ *
+ * @return EntriesExport
+ */
+ public function updateAuthor($method)
+ {
+ if ('entry' !== $method) {
+ $this->author = 'Various authors';
+
+ return $this;
+ }
+
+ $this->author = $this->entries[0]->getDomainName();
+
+ $publishedBy = $this->entries[0]->getPublishedBy();
+ if (!empty($publishedBy)) {
+ $this->author = implode(', ', $publishedBy);
+ }
+
+ return $this;
+ }
+