You are here

public function ProfileType::getTranslation in Profile 2 7

Same name and namespace in other branches
  1. 7.2 profile2.module \ProfileType::getTranslation()

Overridden, to introduce the method for old entity API versions (BC).

@todo Remove once we bump the required entity API version.

Overrides Entity::getTranslation

File

./profile2.module, line 1066
Support for configurable user profiles.

Class

ProfileType
Use a separate class for profile types so we can specify some defaults modules may alter.

Code

public function getTranslation($property, $langcode = NULL) {
  if (module_exists('profile2_i18n')) {
    return parent::getTranslation($property, $langcode);
  }
  return $this->{$property};
}