public function BackgroundImage::getLanguageCode in Background Image 8
Same name and namespace in other branches
- 2.x src/Entity/BackgroundImage.php \Drupal\background_image\Entity\BackgroundImage::getLanguageCode()
- 2.0.x src/Entity/BackgroundImage.php \Drupal\background_image\Entity\BackgroundImage::getLanguageCode()
Returns the currently set langcode for the entity.
@todo Remove if https://www.drupal.org/project/drupal/issues/2303877 lands.
Return value
string The currently set langcode.
1 call to BackgroundImage::getLanguageCode()
- BackgroundImage::getTargetEntity in src/
Entity/ BackgroundImage.php - Retrieves the target entity, if the type is supported and exists.
File
- src/
Entity/ BackgroundImage.php, line 503
Class
- BackgroundImage
- Defines the Background Image entity.
Namespace
Drupal\background_image\EntityCode
public function getLanguageCode() {
if ($this->activeLangcode !== LanguageInterface::LANGCODE_DEFAULT) {
return $this->activeLangcode;
}
return $this->defaultLangcode;
}