48 if (!str_starts_with($core_translation,
"-")) {
49 return $core_translation;
57 $field = $this->field_factory->findOrCreateFieldOfAttribute($attribute);
66 ->findOrCreateFieldByTypeAndIdentifier($type_id, $attribute->getIdentifier());
73 return $this->field_factory;
78 $prefix = $this->
getFieldFactory()->getType()->getStringRepresentation();
82 $topic = implode(
"_", [$prefix, $middle, $identifier]);
84 return $this->dic->language()->txt(strtolower($topic));
120 ->where([
"language_key" =>
$DIC->user()->getCurrentLanguage(),])
130 $lng =
$DIC->language()->getDefaultLanguage();
134 ->where([
"language_key" =>
$lng,])
146 ->where([
"language_key" => $language_key,])
149 if ($inst ===
null) {
151 $inst->setFieldId($field->
getId());
152 $inst->setLanguageKey($language_key);
164 return $this->getCollectionOfTranslationsForField($field)->get();
172 return $this->getCollectionOfTranslationsForField($field)->getArray();
194 self::findById(
$id)->delete();
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static where($where, $operator=null)
static findOrFail($primary_key, array $add_constructor_args=[])
Tries to find the object and throws an Exception if object is not found, instead of returning null.
Customizing of pimple-DIC for ILIAS.
Class ilBiblTranslationFactory.
__construct(protected \ilBiblFieldFactoryInterface $field_factory)
ilBiblTranslationFactory constructor.
deleteById(int $id)
@inheritDoc
translateAttribute(ilBiblAttributeInterface $attribute)
translationExistsForFieldAndSystemsLanguage(ilBiblFieldInterface $field)
@inheritDoc
translateInCore(ilBiblFieldInterface $field)
findArCreateInstanceForFieldAndlanguage(ilBiblFieldInterface $field, string $language_key)
@inheritDoc
findById(int $id)
@inheritDoc
getAllTranslationsForField(ilBiblFieldInterface $field)
@inheritDoc
getInstanceForFieldAndUsersLanguage(ilBiblFieldInterface $field)
@inheritDoc
translationExistsForFieldAndUsersLanguage(ilBiblFieldInterface $field)
@inheritDoc
getInstanceForFieldAndSystemsLanguage(ilBiblFieldInterface $field)
@inheritDoc
translateAttributeString(int $type_id, ilBiblAttributeInterface $attribute)
translate(ilBiblFieldInterface $field)
Translates a field in the current users language in tho folowing order:
translationExistsForField(ilBiblFieldInterface $field)
@inheritDoc
getCollectionOfTranslationsForField(ilBiblFieldInterface $field)
getAllTranslationsForFieldAsArray(ilBiblFieldInterface $field)
@inheritDoc
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...