/**
  * Generate a content
  *
  * @param string $type
  * @param int    $id
  * @param string $name
  * @param string $language
  *
  * @return Content
  */
 protected function generateContent($type, $id, $name, $language)
 {
     $content = new Content();
     $content->setContentId($id);
     $content->setContentType($type);
     $content->setContentTypeVersion(1);
     $content->setDeleted(false);
     $content->setName($name);
     $content->setLanguage($language);
     $content->setStatus($this->getReference('status-published'));
     $content->setCurrentlyPublished(true);
     $content->setVersion(1);
     $content->setSiteId('2');
     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;
 }
 /**
  * Generate a content
  *
  * @param string  $type
  * @param int     $id
  * @param string  $name
  * @param string  $language
  * @param int     $version
  * @param boolean $deleted
  *
  * @return Content
  */
 protected function generateContent($type, $id, $name, $language, $version, $deleted)
 {
     $content = new Content();
     $content->setContentId($id);
     $content->setContentType($type);
     $content->setContentTypeVersion(1);
     $content->setDeleted($deleted);
     $content->setName($name);
     $content->setLanguage($language);
     $content->setVersion($version);
     $content->setSiteId('2');
     switch ($version) {
         case 2:
             $content->setStatus($this->getReference('status-pending'));
             break;
         case 4:
             $content->setStatus($this->getReference('status-draft'));
             break;
         default:
             $content->setStatus($this->getReference('status-published'));
             break;
     }
     if (3 == $version) {
         $content->setCurrentlyPublished(true);
     }
     return $content;
 }