/** * @return Content */ protected function generateCustomerContentFr() { $content = new Content(); $content->setContentId("jsmith"); $content->setContentType("customer"); $content->setContentTypeVersion(1); $content->setDeleted(false); $content->setCreatedBy('admin'); $content->setStatus($this->getReference('status-published')); $content->setName("John Smith"); $content->setLanguage("fr"); $content->setVersion(1); $content->setLinkedToSite(true); $content->setSiteId('3'); $attribute1 = $this->generateContentAttribute('firstname', 'John'); $attribute2 = $this->generateContentAttribute('lastname', 'Smith'); $attribute3 = $this->generateContentAttribute('identifier', 4987, 'integer'); $content->addAttribute($attribute1); $content->addAttribute($attribute2); $content->addAttribute($attribute3); return $content; }
/** * @param string $id * @param string $type * @param int $typeVersion * * @return Content */ protected function addBaseContent($id, $type, $typeVersion) { $content = new Content(); $content->setContentId($id); $content->setContentType($type); $content->setContentTypeVersion($typeVersion); $content->setDeleted(false); $content->setCreatedBy('admin'); $content->setStatus($this->getReference('status-published')); $content->setCurrentlyPublished(true); return $content; }