- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/lib/item/field/scalar.php
- Класс: BitrixTasksItemFieldScalar
- Вызов: Scalar::getValue
public function getValue($key, $item, array $parameters = array())
{
if($item->containsKey($key))
{
return $item->offsetGetDirect($key);
}
$value = null;
if(!$item->getId())
{
// this is a new entity, and no value in cache, so get the default one (read "just like from database")
$value = $this->getDefaultValue($key, $item);
}
else
{
$value = $this->readValueFromDatabase($key, $item);
}
// cache this field, if can
if($this->isCacheable())
{
$item->offsetSetDirect($key, $value);
}
return $value;
}