static function create($name)
{
$author = new Author();
$author->create(array('name' => $name, 'email' => 'temp@temp' . rand(), 'identity' => rand(), 'confirmed' => true));
return $author;
}
/** * @return Author */ public function getAuthor() { if (!$this->hasData('author')) { $this->setData('author', $this->authorFactory->create()->load($this->getAuthorId())); } return $this->getData('author'); }