public function EntityStructureWrapper::getPropertyLanguage in Entity API 7
Gets the language used for retrieving properties.
Return value
string|null The language object of the language or NULL for the default language.
See also
EntityStructureWrapper::language()
2 calls to EntityStructureWrapper::getPropertyLanguage()
- EntityStructureWrapper::getPropertyRaw in includes/
entity.wrapper.inc - Gets the raw value of a property.
- EntityStructureWrapper::getPropertyValue in includes/
entity.wrapper.inc - Gets the value of a property.
File
- includes/
entity.wrapper.inc, line 399 - Provides wrappers allowing easy usage of the entity metadata.
Class
- EntityStructureWrapper
- Provides a general wrapper for any data structure. For this to work the metadata has to be passed during construction.
Code
public function getPropertyLanguage() {
if ($this->langcode != LANGUAGE_NONE && ($list = language_list())) {
if (isset($list[$this->langcode])) {
return $list[$this->langcode];
}
}
return NULL;
}