When exporting an entry, use the publishedBy field as author name for
epub, mobi and pdf formats. Fallback to domain name if empty.
- * Sets the author for just one entry.
+ * 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
*
*
* @param string $method Method to get articles
*
$this->author = $method.' authors';
if ('entry' === $method) {
$this->author = $method.' authors';
if ('entry' === $method) {
- $this->author = $this->entries[0]->getDomainName();
+ $publishedBy = $this->entries[0]->getPublishedBy();
+ if (!empty($publishedBy)) {
+ $this->author = implode(', ', $this->entries[0]->getPublishedBy());
+ } else {
+ $this->author = $this->entries[0]->getDomainName();
+ }