You are here

public function i18n_translation_set::remove_object in Internationalization 7

Remove i18n object from translation set.

2 calls to i18n_translation_set::remove_object()
i18n_translation_set::remove_item in i18n_translation/i18n_translation.inc
Remove item / language from translation set
i18n_translation_set::remove_language in i18n_translation/i18n_translation.inc
Remove language from translation set.

File

i18n_translation/i18n_translation.inc, line 425
Internationalization (i18n) module - Translation set

Class

i18n_translation_set
@file Internationalization (i18n) module - Translation set

Code

public function remove_object($object) {

  // As object's language may have changed, we use our object_languages index better.
  $index = $object
    ->get_index();
  $this
    ->get_translations();
  if (isset($this->object_languages[$index])) {
    $langcode = $this->object_languages[$index];
    unset($this->translations[$langcode]);
    unset($this->object_languages[$index]);
  }
  return $this;
}