translation.handler.taxonomy_term.inc 865 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * @file
  4. * Taxonomy term translation handler for the entity translation module.
  5. */
  6. /**
  7. * Taxonomy term translation handler.
  8. */
  9. class EntityTranslationTaxonomyTermHandler extends EntityTranslationDefaultHandler {
  10. public function __construct($entity_type, $entity_info, $entity) {
  11. parent::__construct('taxonomy_term', $entity_info, $entity);
  12. }
  13. /**
  14. * @see EntityTranslationDefaultHandler::entityForm()
  15. */
  16. public function entityForm(&$form, &$form_state) {
  17. parent::entityForm($form, $form_state);
  18. // Remove the translation fieldset when the deletion confirm form is being
  19. // displayed.
  20. if (isset($form_state['confirm_delete'])) {
  21. unset(
  22. $form[$this->getLanguageKey()],
  23. $form['source_language'],
  24. $form['translation'],
  25. $form['actions']['delete_translation']
  26. );
  27. }
  28. }
  29. }