49 if (strpos($core_translation,
"-") !== 0) {
50 return $core_translation;
62 $field = $this->field_factory->findOrCreateFieldOfAttribute($attribute);
74 ->findOrCreateFieldByTypeAndIdentifier($type_id, $attribute->getIdentifier());
96 $prefix = $this->
getFieldFactory()->getType()->getStringRepresentation();
100 $topic = implode(
"_", [ $prefix, $middle, $identifier ]);
102 return $this->dic->language()->txt(strtolower($topic));
141 ->where([
"language_key" => $DIC->user()->getCurrentLanguage(), ])
152 $lng = $DIC->language()->getDefaultLanguage();
155 ->where([
"language_key" =>
$lng, ])
166 ->where([
"language_key" => $language_key, ])
171 $inst->setFieldId($field->
getId());
172 $inst->setLanguageKey($language_key);
223 self::findById(
$id)->delete();
translationExistsForFieldAndUsersLanguage(ilBiblFieldInterface $field)
Interface ilBiblEntryInterface.
Interface ilBiblAttributeInterface.
if(!array_key_exists('StateId', $_REQUEST)) $id
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...
Class ilBiblTranslationFactory.
__construct(ilBiblFieldFactoryInterface $field_factory)
ilBiblTranslationFactory constructor.
translate(ilBiblFieldInterface $field)
getAllTranslationsForField(ilBiblFieldInterface $field)
findArCreateInstanceForFieldAndlanguage(ilBiblFieldInterface $field, $language_key)
Interface ilBiblFieldFactoryInterface.
translationExistsForField(ilBiblFieldInterface $field)
translateAttribute(ilBiblAttributeInterface $attribute)
translationExistsForFieldAndSystemsLanguage(ilBiblFieldInterface $field)
getInstanceForFieldAndUsersLanguage(ilBiblFieldInterface $field)
getInstanceForFieldAndSystemsLanguage(ilBiblFieldInterface $field)
translateInCore(ilBiblFieldInterface $field)
translateAttributeString($type_id, ilBiblAttributeInterface $attribute)
getCollectionOfTranslationsForField(ilBiblFieldInterface $field)