Bitrix API

Contact extends Base

Class Contact

Table of Contents

Constants

SEARCH_FIELD_NAME  = 'SEARCH_CONTENT'

Methods

__construct()  : mixed
Base constructor.
addError()  : mixed
Add error.
addToBlacklist()  : bool
Add to blacklist.
addToList()  : bool
Add to list.
clearErrors()  : mixed
Clear errors.
create()  : static
Create instance.
get()  : mixed
Get data value by key.
getData()  : mixed
Get data.
getDataClass()  : mixed
Get data class.
getErrorCollection()  : ErrorCollection
Get error collection.
getErrorMessages()  : array<string|int, mixed>
Get error messages.
getErrors()  : array<string|int, mixed>
Get errors.
getId()  : int
Get ID.
getList()  : Result
Get list.
getSearchBuilder()  : null|Builder
Get data class.
getUser()  : mixed
Get user.
hasErrors()  : bool
Return true if it have errors.
load()  : bool
Load.
loadByArray()  : bool
Load by array.
loadData()  : array<string|int, mixed>|null
Load data.
mergeData()  : $this
Merge data.
remove()  : bool
Remove.
removeById()  : bool
Remove by contact ID.
removeFromBlacklist()  : bool
Remove from blacklist.
removeFromBlacklistById()  : bool
Remove from blacklist by contact ID.
removeFromList()  : bool
Remove from list.
save()  : mixed
Save.
saveSearchIndex()  : bool
Save search index.
set()  : $this
Set data value by key.
setData()  : $this
Set data.
setId()  : $this
Set ID.
setUser()  : mixed
Set user.
subscribe()  : bool
Subscribe.
unsetByKey()  : $this
Unset data value by key.
unsubscribe()  : bool
Unsubscribe.

Constants

SEARCH_FIELD_NAME

public mixed SEARCH_FIELD_NAME = 'SEARCH_CONTENT'

Methods

__construct()

Base constructor.

public __construct([int|null $id = null ]) : mixed
Parameters
$id : int|null = null

ID.

addError()

Add error.

public addError(string $message[, string|null $code = null ]) : mixed
Parameters
$message : string

Message text.

$code : string|null = null

Code.

addToBlacklist()

Add to blacklist.

public addToBlacklist() : bool
Return values
bool

addToList()

Add to list.

public addToList(int $listId) : bool
Parameters
$listId : int

List ID.

Return values
bool

clearErrors()

Clear errors.

public clearErrors() : mixed

create()

Create instance.

public static create([int|null $id = null ]) : static
Parameters
$id : int|null = null

ID.

Return values
static

get()

Get data value by key.

public get(string $key[, mixed|null $defaultValue = null ]) : mixed
Parameters
$key : string

Key.

$defaultValue : mixed|null = null

Default value.

getData()

Get data.

public getData() : mixed

getDataClass()

Get data class.

public static getDataClass() : mixed
Tags
@return

null|MainDataManager;

getErrorCollection()

Get error collection.

public getErrorCollection() : ErrorCollection
Return values
ErrorCollection

getErrorMessages()

Get error messages.

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

getErrors()

Get errors.

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

getId()

Get ID.

public getId() : int
Return values
int

getList()

Get list.

public static getList([array<string|int, mixed> $parameters = array() ]) : Result
Parameters
$parameters : array<string|int, mixed> = array()

Parameters.

Return values
Result

getSearchBuilder()

Get data class.

public static getSearchBuilder() : null|Builder
Return values
null|Builder

getUser()

Get user.

public getUser() : mixed
Tags
@return

Security\User;

hasErrors()

Return true if it have errors.

public hasErrors() : bool
Return values
bool

load()

Load.

public load(int $id) : bool
Parameters
$id : int

ID.

Return values
bool

loadByArray()

Load by array.

public loadByArray(array<string|int, mixed> $data) : bool
Parameters
$data : array<string|int, mixed>

Data.

Return values
bool

loadData()

Load data.

public loadData(int $id) : array<string|int, mixed>|null
Parameters
$id : int

ID.

Return values
array<string|int, mixed>|null

mergeData()

Merge data.

public mergeData(array<string|int, mixed> $data) : $this
Parameters
$data : array<string|int, mixed>

Data.

Return values
$this

remove()

Remove.

public remove() : bool
Return values
bool

removeById()

Remove by contact ID.

public static removeById(int $id) : bool
Parameters
$id : int

Contact ID.

Return values
bool

removeFromBlacklist()

Remove from blacklist.

public removeFromBlacklist() : bool
Return values
bool

removeFromBlacklistById()

Remove from blacklist by contact ID.

public static removeFromBlacklistById(int $id) : bool
Parameters
$id : int

Contact ID.

Return values
bool

removeFromList()

Remove from list.

public removeFromList(int $listId) : bool
Parameters
$listId : int

List ID.

Return values
bool

save()

Save.

public save() : mixed

saveSearchIndex()

Save search index.

public saveSearchIndex() : bool
Return values
bool

set()

Set data value by key.

public set(string $key, mixed $value) : $this
Parameters
$key : string

Key.

$value : mixed

Value.

Return values
$this

setData()

Set data.

public setData(array<string|int, mixed> $data) : $this
Parameters
$data : array<string|int, mixed>

Data.

Return values
$this

setId()

Set ID.

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

ID.

Return values
$this

setUser()

Set user.

public setUser([User|null $user = null ]) : mixed
Parameters
$user : User|null = null

User.

Tags
@return

$this;

subscribe()

Subscribe.

public subscribe([int|null $campaignId = null ]) : bool
Parameters
$campaignId : int|null = null

Campaign ID.

Return values
bool

unsetByKey()

Unset data value by key.

public unsetByKey(string $key) : $this
Parameters
$key : string

Key.

Return values
$this

unsubscribe()

Unsubscribe.

public unsubscribe([int|null $campaignId = null ]) : bool
Parameters
$campaignId : int|null = null

Campaign ID.

Return values
bool

        
On this page

Search results