Location implements Serializable
FinalYes
Class Location
Table of Contents
Interfaces
- Serializable
Methods
- __construct() : mixed
- Location constructor.
- __serialize() : array<string|int, mixed>
- __unserialize() : void
- delete() : Result
- Delete the Location
- fromArray() : Location
- Create Location from the Array
- getAddress() : Address
- getAllFieldsValues() : array<string|int, mixed>
- Return all fields values
- getCode() : string
- getExternalId() : string
- getFieldValue() : string|null
- getId() : int
- getLanguageId() : string
- getLatitude() : string
- getLongitude() : string
- getName() : string
- getNameWithParents() : string
- Return Location name imploded with parents names
- getSourceCode() : string
- getType() : int
- isChildOf() : bool
- Check if this Location is parent of the other Location
- isEqualTo() : bool
- Check if this Location and the other Location are the same
- isFieldExist() : bool
- Check if the Location field exists
- isParentOf() : bool
- Check if this Location is parent of the other Location
- load() : Location|bool|null
- Load the Location
- save() : Result
- Save Location
- serialize() : string
- Serialize the Location
- setAddress() : $this
- setCode() : $this
- setExternalId() : $this
- setFieldValue() : $this
- Set the Location field value
- setId() : $this
- setLanguageId() : $this
- setLatitude() : self
- setLongitude() : self
- setName() : $this
- setSourceCode() : $this
- setType() : $this
- toArray() : array<string|int, mixed>
- Convert the Location to an Array
- toJson() : string
- unserialize() : mixed
- Unserialize the Location
Methods
__construct()
Location constructor.
public
__construct() : mixed
__serialize()
public
__serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>__unserialize()
public
__unserialize(array<string|int, mixed> $data) : void
Parameters
- $data : array<string|int, mixed>
delete()
Delete the Location
public
delete() : Result
Return values
ResultfromArray()
Create Location from the Array
public
static fromArray(array<string|int, mixed> $location) : Location
Parameters
- $location : array<string|int, mixed>
Return values
LocationgetAddress()
public
getAddress() : Address
Return values
AddressgetAllFieldsValues()
Return all fields values
public
getAllFieldsValues() : array<string|int, mixed>
Return values
array<string|int, mixed>getCode()
public
getCode() : string
Return values
stringgetExternalId()
public
getExternalId() : string
Return values
stringgetFieldValue()
public
getFieldValue(int $type) : string|null
Parameters
- $type : int
-
Location type. See \Bitrix\Location\Entity\Location\Type
Return values
string|nullgetId()
public
getId() : int
Return values
intgetLanguageId()
public
getLanguageId() : string
Return values
stringgetLatitude()
public
getLatitude() : string
Return values
stringgetLongitude()
public
getLongitude() : string
Return values
stringgetName()
public
getName() : string
Return values
stringgetNameWithParents()
Return Location name imploded with parents names
public
getNameWithParents() : string
Tags
Return values
stringgetSourceCode()
public
getSourceCode() : string
Return values
stringgetType()
public
getType() : int
Tags
Return values
intisChildOf()
Check if this Location is parent of the other Location
public
isChildOf(Location $parentCandidate) : bool
Parameters
- $parentCandidate : Location
Return values
boolisEqualTo()
Check if this Location and the other Location are the same
public
isEqualTo(Location $location) : bool
Parameters
- $location : Location
Return values
boolisFieldExist()
Check if the Location field exists
public
isFieldExist(int $type) : bool
Parameters
- $type : int
-
Location type. See \Bitrix\Location\Entity\Location\Type
Return values
boolisParentOf()
Check if this Location is parent of the other Location
public
isParentOf(Location $childCandidate) : bool
Parameters
- $childCandidate : Location
Return values
boolload()
Load the Location
public
static load(int $id[, string $languageId = LANGUAGE_ID ]) : Location|bool|null
Parameters
- $id : int
- $languageId : string = LANGUAGE_ID
Return values
Location|bool|nullsave()
Save Location
public
save() : Result
Return values
Resultserialize()
Serialize the Location
public
serialize() : string
Return values
stringsetAddress()
public
setAddress(Address $address) : $this
Parameters
- $address : Address
Return values
$thissetCode()
public
setCode(string $code) : $this
Parameters
- $code : string
Return values
$thissetExternalId()
public
setExternalId(string $externalId) : $this
Parameters
- $externalId : string
Return values
$thissetFieldValue()
Set the Location field value
public
setFieldValue(int $type, string $value) : $this
Parameters
- $type : int
-
Location type. See \Bitrix\Location\Entity\Location\Type
- $value : string
Tags
Return values
$thissetId()
public
setId(int $id) : $this
Parameters
- $id : int
Return values
$thissetLanguageId()
public
setLanguageId(string $languageId) : $this
Parameters
- $languageId : string
Return values
$thissetLatitude()
public
setLatitude(string $latitude) : self
Parameters
- $latitude : string
Return values
selfsetLongitude()
public
setLongitude(string $longitude) : self
Parameters
- $longitude : string
Return values
selfsetName()
public
setName(string $name) : $this
Parameters
- $name : string
Return values
$thissetSourceCode()
public
setSourceCode(string $sourceCode) : $this
Parameters
- $sourceCode : string
Return values
$thissetType()
public
setType(int $type) : $this
Parameters
- $type : int
Tags
Return values
$thistoArray()
Convert the Location to an Array
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>toJson()
public
toJson() : string
Return values
stringunserialize()
Unserialize the Location
public
unserialize(string $serialized) : mixed
Parameters
- $serialized : string