public function EntityTranslationDefaultHandler::__construct in Entity Translation 7
Initializes an instance of the translation handler.
Parameters
$entity_type: The type of the entity being wrapped.
$entity_info: The entity information for the entity being wrapped.
$entity: The entity being wrapped.
4 calls to EntityTranslationDefaultHandler::__construct()
- EntityTranslationCommentHandler::__construct in includes/
translation.handler.comment.inc - Initializes an instance of the translation handler.
- EntityTranslationNodeHandler::__construct in includes/
translation.handler.node.inc - Initializes an instance of the translation handler.
- EntityTranslationTaxonomyTermHandler::__construct in includes/
translation.handler.taxonomy_term.inc - Initializes an instance of the translation handler.
- EntityTranslationUserHandler::__construct in includes/
translation.handler.user.inc - Initializes an instance of the translation handler.
4 methods override EntityTranslationDefaultHandler::__construct()
- EntityTranslationCommentHandler::__construct in includes/
translation.handler.comment.inc - Initializes an instance of the translation handler.
- EntityTranslationNodeHandler::__construct in includes/
translation.handler.node.inc - Initializes an instance of the translation handler.
- EntityTranslationTaxonomyTermHandler::__construct in includes/
translation.handler.taxonomy_term.inc - Initializes an instance of the translation handler.
- EntityTranslationUserHandler::__construct in includes/
translation.handler.user.inc - Initializes an instance of the translation handler.
File
- includes/
translation.handler.inc, line 437 - Default translation handler for the translation module.
Class
- EntityTranslationDefaultHandler
- Class implementing the default entity translation behaviours.
Code
public function __construct($entity_type, $entity_info, $entity) {
$this->entityType = $entity_type;
$this->entityInfo = $entity_info;
$this
->setEntity($entity);
$this->entityForm = FALSE;
$this->translating = FALSE;
$this->outdated = FALSE;
$this->activeLanguage = FALSE;
$this->sourceLanguage = FALSE;
$this->pathScheme = 'default';
$this->routerMap = array();
if (entity_translation_enabled($entity_type)) {
$this
->initPathVariables();
}
}