Address
FinalYes
Class Address
Table of Contents
Methods
- __construct() : mixed
- Address constructor.
- addLink() : void
- Link entity to address
- clearLinks() : void
- Removes all links
- delete() : DeleteResult
- Delete the address
- fromArray() : Address
- Create the Address from Array
- fromJson() : Address
- Create the Address from JSON
- getAllFieldsValues() : array<string|int, mixed>
- Get all fields values from the address
- getFieldValue() : string|null
- Get address field value
- getId() : int
- getLanguageId() : string
- getLatitude() : string
- getLinks() : AddressLinkCollection
- getLocation() : Location
- getLongitude() : string
- hasLinks() : bool
- Check if Address has links or not
- isFieldExist() : bool
- Check if field exist
- load() : Address|bool|null
- Load the Address
- save() : AddResult|Result|UpdateResult
- Save the Address
- setFieldValue() : $this
- Set address field value
- setId() : $this
- setLatitude() : Address
- setLinks() : void
- setLocation() : self
- setLongitude() : Address
- toArray() : array<string|int, mixed>
- Convert the Address to Array
- toJson() : string
- Convert the Address to JSON
- toString() : string
- Convert Address to String
Methods
__construct()
Address constructor.
public
__construct(string $languageId) : mixed
Parameters
- $languageId : string
addLink()
Link entity to address
public
addLink(string $entityId, string $entityType) : void
Parameters
- $entityId : string
- $entityType : string
Tags
clearLinks()
Removes all links
public
clearLinks() : void
delete()
Delete the address
public
delete() : DeleteResult
Tags
Return values
DeleteResultfromArray()
Create the Address from Array
public
static fromArray(array<string|int, mixed> $arrayData) : Address
Parameters
- $arrayData : array<string|int, mixed>
Return values
AddressfromJson()
Create the Address from JSON
public
static fromJson(string $jsonData) : Address
Parameters
- $jsonData : string
Tags
Return values
AddressgetAllFieldsValues()
Get all fields values from the address
public
getAllFieldsValues() : array<string|int, mixed>
Return values
array<string|int, mixed>getFieldValue()
Get address field value
public
getFieldValue(int $type) : string|null
Parameters
- $type : int
-
Field type. See \Bitrix\Location\Entity\Address\FieldType
Return values
string|nullgetId()
public
getId() : int
Return values
intgetLanguageId()
public
getLanguageId() : string
Return values
stringgetLatitude()
public
getLatitude() : string
Return values
stringgetLinks()
public
getLinks() : AddressLinkCollection
Return values
AddressLinkCollectiongetLocation()
public
getLocation() : Location
Return values
LocationgetLongitude()
public
getLongitude() : string
Return values
stringhasLinks()
Check if Address has links or not
public
hasLinks() : bool
Return values
boolisFieldExist()
Check if field exist
public
isFieldExist(int $type) : bool
Parameters
- $type : int
-
Field type. See \Bitrix\Location\Entity\Address\FieldType
Return values
boolload()
Load the Address
public
static load(int $id) : Address|bool|null
Parameters
- $id : int
Tags
Return values
Address|bool|nullsave()
Save the Address
public
save() : AddResult|Result|UpdateResult
Tags
Return values
AddResult|Result|UpdateResultsetFieldValue()
Set address field value
public
setFieldValue(int $type, string $value) : $this
Parameters
- $type : int
-
Field type. See \Bitrix\Location\Entity\Address\FieldType
- $value : string
-
Field value
Tags
Return values
$thissetId()
public
setId(int $id) : $this
Parameters
- $id : int
Return values
$thissetLatitude()
public
setLatitude(string $latitude) : Address
Parameters
- $latitude : string
Return values
AddresssetLinks()
public
setLinks(AddressLinkCollection $collection) : void
Parameters
- $collection : AddressLinkCollection
setLocation()
public
setLocation(Location|null $location) : self
Parameters
- $location : Location|null
Return values
selfsetLongitude()
public
setLongitude(string $longitude) : Address
Parameters
- $longitude : string
Return values
AddresstoArray()
Convert the Address to Array
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>toJson()
Convert the Address to JSON
public
toJson() : string
Tags
Return values
string —Json
toString()
Convert Address to String
public
toString(Format $format[, string $strategyType = StringConverter::STRATEGY_TYPE_TEMPLATE ][, string $contentType = StringConverter::CONTENT_TYPE_HTML ]) : string
Parameters
- $format : Format
-
Address format
- $strategyType : string = StringConverter::STRATEGY_TYPE_TEMPLATE
-
See StringConverter::STRATEGY_*
- $contentType : string = StringConverter::CONTENT_TYPE_HTML
-
See StringConverter::CONTENT_TYPE_*