• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/rest/entity/baseobject.php
  • Класс: BitrixDiskRestEntityBaseObject
  • Вызов: BaseObject::getFieldsForMap
public function getFieldsForMap()
{
	return array(
		'TYPE' => array(
			'IN' => function($externalValue){
				switch($externalValue)
				{
					case 'folder':
						return ObjectTable::TYPE_FOLDER;
					case 'file':
						return ObjectTable::TYPE_FILE;
				}

				return null;
			},
			'OUT' => function($internalValue){
				switch($internalValue)
				{
					case ObjectTable::TYPE_FOLDER:
						return 'folder';
					case ObjectTable::TYPE_FILE:
						return 'file';
				}

				return null;
			}
		),
		'CREATE_TIME' => array(
			'IN' => function($externalValue){
				return CRestUtil::unConvertDateTime($externalValue);
			},
			'OUT' => function(DateTime $internalValue = null){
				return CRestUtil::convertDateTime($internalValue);
			},
		),
		'UPDATE_TIME' => array(
			'IN' => function($externalValue){
				return CRestUtil::unConvertDateTime($externalValue);
			},
			'OUT' => function(DateTime $internalValue = null){
				return CRestUtil::convertDateTime($internalValue);
			},
		),
		'DELETE_TIME' => array(
			'IN' => function($externalValue){
				return CRestUtil::unConvertDateTime($externalValue);
			},
			'OUT' => function(DateTime $internalValue = null){
				return CRestUtil::convertDateTime($internalValue);
			},
		),
	);
}