You are here

public function EntityTranslationHandlerFactory::getLastHandler in Entity Translation 7

Returns the last translation handler retrieved.

Parameters

$entity_type: (optional) The entity type of the translation handler. Defaults to the last one.

Return value

EntityTranslationHandlerInterface A class implementing EntityTranslationHandlerInterface.

File

includes/translation.handler_factory.inc, line 130
Translation handler factory for the Entity Translation module.

Class

EntityTranslationHandlerFactory
Class implementing the entity translation handler factory.

Code

public function getLastHandler($entity_type = NULL) {
  if (isset($entity_type)) {
    return isset($this->lastByType[$entity_type]) ? $this->lastByType[$entity_type] : NULL;
  }
  return $this->last;
}