public function getNewInstance()
 {
     /**
      * @var Site $object
      */
     $object = parent::getNewInstance();
     $object->setEnabled(true);
     $lv = new LanguageVersion();
     $lv->setEnabled(true);
     $lv->setName('Default');
     $lv->setHost('localhost');
     $lv->setRelativePath('');
     $lv->setLocale('cs');
     $lv->setIsDefault(true);
     $object->addLanguageVersion($lv);
     return $object;
 }
Example #2
0
 /**
  * Add languageVersions
  *
  * @param LanguageVersion $languageVersions
  * @return Site
  */
 public function addLanguageVersion(LanguageVersion $languageVersions)
 {
     $this->languageVersions[$languageVersions->getLocale()] = $languageVersions;
     return $this;
 }