Add subspecies.

@param \Librinfo\VarietiesBundle\Entity\Species $subspecies

@return Species
548473
public function addSubspecies(\Librinfo\VarietiesBundle\Entity\Species $subspecies)
    {
        $subspecies->setParentSpecies($this);
        $this->subspecieses[] = $subspecies;

        return $this;
    }
831365
public function add(MediaType $mediaType)
    {
        $this->mediaTypes[$mediaType->getName()] = $mediaType;

        foreach ($mediaType->getMimetypes() as $mimetype) {
            $this->mimetypeMap[$mimetype] = $mediaType->getName();
        }

        return $this;
    }
229471
public function add(Type $type, Theme $theme, $handle, $name, $locale, $default = false)
    {
        $factory = new Factory($this->config);
        $site = $factory->createEntity();
        $site->setSiteHandle($handle);
        $site->setIsDefault($default);
        $site->setType($type);
        $site->setThemeID($theme->getThemeID());
        $site->getConfigRepository()->save('name', $name);

        $this->entityManager->persist($site);
        $this->entityManager->flush();

        $data = explode('_', $locale);
        $locale = new Locale();
        $locale->setSite($site);
        $locale->setIsDefault(true);
        $locale->setLanguage($data[0]);
        $locale->setCountry($data[1]);

        $localeService = new \Concrete\Core\Localization\Locale\Service($this->entityManager);
        $localeService->updatePluralSettings($locale);

        $this->entityManager->persist($locale);
        $this->entityManager->flush();

        $this->entityManager->refresh($site);

        return $site;
    }
621915
public function addTranslates(array $fieldTrans): self
    {
        foreach ($fieldTrans as $field => $tran) {
            $this->_translates[$field] = $tran;
        }
        return $this;
    }
364305
public function addMeta(\Sulu\Bundle\MediaBundle\Entity\FileVersionMeta $meta)
    {
        $this->meta[] = $meta;

        return $this;
    }
369484
public function addFrom($tables) {
		if(!$tables)
			return $this;

		if(is_string($tables))
			$tables = explode(',', $tables);
		elseif(!is_array($tables))
			$tables = [$tables];
		foreach($tables as $k=>$tablestr) {
			if($tablestr instanceof static) {
				$table = $tablestr;
				$alias = $k;
			}
			elseif($tablestr instanceof Raw) {
				$table = $tablestr;
				$alias = $k;
			}
			else {
				$tablestr = trim($tablestr);

				preg_match('/(.*?) ([a-z_][a-zA-Z0-9_]*)?$/i', $tablestr, $matches);
				if(isset($matches[2])) {
					$alias = $matches[2];
					$table = $matches[1];
				}
				else
					$alias = $table = $tablestr;

				if(isset($this->tables[$alias]))
					throw new \Exception('Table alias '.$alias.' is already used.');
			}
			
			$this->tables[$alias] = $table;
		}

		return $this;
	}
948707
public function addVersion( PhpVersion $version ) {
		$versionString = $version->getVersion();

		$this->phpVersions[$versionString] = $version;

		return $this;
	}
1126276
public function addSpeciese(\Librinfo\VarietiesBundle\Entity\Species $species)
    {
        $species->setGenus($this);
        $this->specieses->add($species);

        return $this;
    }
274684
public function addUF($fields)
    {
        if (!$fields['FIELD_NAME']) {
            throw new MigrationException('Не заполнен FIELD_NAME');
        }

        if (!$fields['ENTITY_ID']) {
            throw new MigrationException('Не заполнен код ENTITY_ID');
        }

        $oUserTypeEntity = new CUserTypeEntity();

        $fieldId = $oUserTypeEntity->Add($fields);

        if (!$fieldId) {
            throw new MigrationException("Не удалось создать пользовательское свойство с FIELD_NAME = {$fields['FIELD_NAME']} и ENTITY_ID = {$fields['ENTITY_ID']}");
        }

        return $fieldId;
    }
580561
public function addGenus(\Librinfo\VarietiesBundle\Entity\Genus $genus)
    {
        $genus->setFamily($this);
        $this->genuses->add($genus);

        return $this;
    }
393153
public function addLocale($locale)
    {
        // Get sanitized locale
        $locale = Locale::sanitizeLocale($locale);

        if (!isset($this->available[$locale])) {
            $locale = new Locale($locale);

            $this->available[$locale->getLocale()] = $locale;
        }

        return $this;
    }
637073
public function addTranslation(\Sulu\Bundle\ProductBundle\Entity\AttributeSetTranslation $translations)
    {
        $this->translations[] = $translations;

        return $this;
    }
126779
public function addVersion($con = null)
    {
        $this->enforceVersion = false;

        $version = new ChildIndexEngineIndexVersion();
        $version->setId($this->getId());
        $version->setVisible($this->getVisible());
        $version->setCode($this->getCode());
        $version->setTitle($this->getTitle());
        $version->setType($this->getType());
        $version->setEntity($this->getEntity());
        $version->setSerializedColumns($this->getSerializedColumns());
        $version->setSerializedCondition($this->getSerializedCondition());
        $version->setIndexEngineDriverConfigurationId($this->getIndexEngineDriverConfigurationId());
        $version->setCreatedAt($this->getCreatedAt());
        $version->setUpdatedAt($this->getUpdatedAt());
        $version->setVersion($this->getVersion());
        $version->setVersionCreatedAt($this->getVersionCreatedAt());
        $version->setVersionCreatedBy($this->getVersionCreatedBy());
        $version->setIndexEngineIndex($this);
        $version->save($con);

        return $version;
    }
757493
public function addTranslation(\Haven\PersonaBundle\Entity\CountryTranslation $translations)
    {
        $this->translations[] = $translations;

        return $this;
    }
217878
public function addTranslation(\Sulu\Bundle\ProductBundle\Entity\AttributeValueTranslation $translations)
    {
        $this->translations[] = $translations;

        return $this;
    }
1279556
public function addTypeExtensions(array $typeExtensions)
    {
        foreach ($typeExtensions as $typeExtension) {
            $this->typeExtensions[$typeExtension->getExtendedType()][] = $typeExtension;
        }

        return $this;
    }
1278400
public function addTranslation(\Haven\PersonaBundle\Entity\EnterpriseTranslation $translations)
    {
        $translations->setParent($this);
        $this->translations[] = $translations;

        return $this;
    }