You are here

public function EdgeEntityBase::getTranslation in Apigee Edge 8

File

src/Entity/EdgeEntityBase.php, line 167

Class

EdgeEntityBase
Base class for Apigee Edge entities in Drupal.

Namespace

Drupal\apigee_edge\Entity

Code

public function getTranslation($langcode) {
  if ($langcode == $this
    ->language()
    ->getId()) {
    return $this;
  }
  throw new \InvalidArgumentException("Invalid translation language ({$langcode}) specified.");
}