Bitrix API

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
Result

fromArray()

Create Location from the Array

public static fromArray(array<string|int, mixed> $location) : Location
Parameters
$location : array<string|int, mixed>
Return values
Location

getAllFieldsValues()

Return all fields values

public getAllFieldsValues() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCode()

public getCode() : string
Return values
string

getExternalId()

public getExternalId() : string
Return values
string

getFieldValue()

public getFieldValue(int $type) : string|null
Parameters
$type : int

Location type. See \Bitrix\Location\Entity\Location\Type

Return values
string|null

getId()

public getId() : int
Return values
int

getLanguageId()

public getLanguageId() : string
Return values
string

getLatitude()

public getLatitude() : string
Return values
string

getLongitude()

public getLongitude() : string
Return values
string

getName()

public getName() : string
Return values
string

getNameWithParents()

Return Location name imploded with parents names

public getNameWithParents() : string
Tags
todo:

customize delimiter and the names order

Return values
string

getSourceCode()

public getSourceCode() : string
Return values
string

getType()

public getType() : int
Tags
see
Type
Return values
int

isChildOf()

Check if this Location is parent of the other Location

public isChildOf(Location $parentCandidate) : bool
Parameters
$parentCandidate : Location
Return values
bool

isEqualTo()

Check if this Location and the other Location are the same

public isEqualTo(Location $location) : bool
Parameters
$location : Location
Return values
bool

isFieldExist()

Check if the Location field exists

public isFieldExist(int $type) : bool
Parameters
$type : int

Location type. See \Bitrix\Location\Entity\Location\Type

Return values
bool

isParentOf()

Check if this Location is parent of the other Location

public isParentOf(Location $childCandidate) : bool
Parameters
$childCandidate : Location
Return values
bool

load()

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|null

save()

Save Location

public save() : Result
Return values
Result

serialize()

Serialize the Location

public serialize() : string
Return values
string

setCode()

public setCode(string $code) : $this
Parameters
$code : string
Return values
$this

setExternalId()

public setExternalId(string $externalId) : $this
Parameters
$externalId : string
Return values
$this

setFieldValue()

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
throws
SystemException
Return values
$this

setId()

public setId(int $id) : $this
Parameters
$id : int
Return values
$this

setLanguageId()

public setLanguageId(string $languageId) : $this
Parameters
$languageId : string
Return values
$this

setLatitude()

public setLatitude(string $latitude) : self
Parameters
$latitude : string
Return values
self

setLongitude()

public setLongitude(string $longitude) : self
Parameters
$longitude : string
Return values
self

setName()

public setName(string $name) : $this
Parameters
$name : string
Return values
$this

setSourceCode()

public setSourceCode(string $sourceCode) : $this
Parameters
$sourceCode : string
Return values
$this

setType()

public setType(int $type) : $this
Parameters
$type : int
Tags
see
Types
throws
ArgumentOutOfRangeException
Return values
$this

toArray()

Convert the Location to an Array

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

toJson()

public toJson() : string
Return values
string

unserialize()

Unserialize the Location

public unserialize(string $serialized) : mixed
Parameters
$serialized : string

        
On this page

Search results