function FieldsRSIPreventor::getItem in Media Gallery 7
Same name and namespace in other branches
- 7.2 fields_rsi_prevention.inc \FieldsRSIPreventor::getItem()
1 call to FieldsRSIPreventor::getItem()
File
- ./
fields_rsi_prevention.inc, line 41 - This file provides easier access on entity properties and methods.
Class
- FieldsRSIPreventor
- Decorates an entity to provide getters/setters.
Code
function getItem($field_name, $delta = 0, $language = LANGUAGE_NONE) {
if (!isset($this->entity->{$field_name}[$language]) || !isset($this->entity->{$field_name}[$language][$delta])) {
return FALSE;
}
return $this->entity->{$field_name}[$language][$delta];
}