| Current Path : /var/www/homesaver/www/bitrix/js/location/core/src/entity/location/ |
| Current File : /var/www/homesaver/www/bitrix/js/location/core/src/entity/location/locationfieldcollection.js |
import FieldCollection from '../generic/fieldcollection';
import LocationField from './locationfield';
export default class LocationFieldCollection extends FieldCollection
{
getFieldValue(type)
{
let result = null;
if(this.isFieldExists(type))
{
const field = this.getField(type);
if(field)
{
result = field.value;
}
}
return result;
}
setFieldValue(type, value)
{
this.setField(
new LocationField({type, value})
);
return this;
}
}