25 protected \ILIAS\DI\Container
$dic;
48 if (strpos($core_translation,
"-") !== 0) {
49 return $core_translation;
57 $field = $this->field_factory->findOrCreateFieldOfAttribute($attribute);
66 ->findOrCreateFieldByTypeAndIdentifier($type_id, $attribute->getIdentifier());
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,])
151 $inst->setFieldId($field->
getId());
152 $inst->setLanguageKey($language_key);
194 self::findById($id)->delete();
findArCreateInstanceForFieldAndlanguage(ilBiblFieldInterface $field, string $language_key)
ilBiblFieldFactoryInterface $field_factory
translationExistsForFieldAndUsersLanguage(ilBiblFieldInterface $field)
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...
NullPointerExceptionInspection
static where($where, $operator=null)
getAllTranslationsForFieldAsArray(ilBiblFieldInterface $field)
static findOrFail($primary_key, array $add_constructor_args=array())
Tries to find the object and throws an Exception if object is not found, instead of returning null...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(ilBiblFieldFactoryInterface $field_factory)
ilBiblTranslationFactory constructor.
translate(ilBiblFieldInterface $field)
Translates a field in the current users language in tho folowing order:
getAllTranslationsForField(ilBiblFieldInterface $field)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
translationExistsForField(ilBiblFieldInterface $field)
translateAttribute(ilBiblAttributeInterface $attribute)
translateAttributeString(int $type_id, ilBiblAttributeInterface $attribute)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
translationExistsForFieldAndSystemsLanguage(ilBiblFieldInterface $field)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getInstanceForFieldAndUsersLanguage(ilBiblFieldInterface $field)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
getInstanceForFieldAndSystemsLanguage(ilBiblFieldInterface $field)
translateInCore(ilBiblFieldInterface $field)
getCollectionOfTranslationsForField(ilBiblFieldInterface $field)