Bitrix API

Segment extends Base

Class Base

Table of Contents

Constants

CODE_ALL  = 'all'
SEARCH_FIELD_NAME  = 'SEARCH_CONTENT'

Methods

__construct()  : mixed
Base constructor.
addError()  : mixed
Add error.
appendContactSetConnector()  : $this
Append contact set connector.
clearErrors()  : mixed
Clear errors.
copy()  : bool
Copy.
create()  : static
Create instance.
get()  : mixed
Get data value by key.
getAddressCounter()  : DataCounter
Get segment address counter.
getAddressCounters()  : array<string|int, mixed>
Get segment address counters.
getData()  : mixed
Get data.
getDataClass()  : mixed
Get data class.
getDefaultIds()  : array<string|int, mixed>
Get default segments.
getErrorCollection()  : ErrorCollection
Get error collection.
getErrorMessages()  : array<string|int, mixed>
Get error messages.
getErrors()  : array<string|int, mixed>
Get errors.
getId()  : int
Get ID.
getIdByCode()  : int|null
Get segment ID by code.
getList()  : Result
Get list.
getSearchBuilder()  : null|Builder
Get data class.
getUser()  : mixed
Get user.
hasErrors()  : bool
Return true if it have errors.
isFilterOnly()  : bool
Is save filters only.
isHidden()  : bool
Return true if segment is hidden.
isSystem()  : bool
Return true if segment is system.
load()  : bool
Load.
loadByArray()  : bool
Load by array.
mergeData()  : $this
Merge data.
remove()  : bool
Remove.
removeById()  : bool
Remove by letter ID.
save()  : mixed
Save.
saveSearchIndex()  : bool
Save search index.
set()  : $this
Set data value by key.
setData()  : $this
Set data.
setFilterOnlyMode()  : $this
Set save filter only mode.
setId()  : $this
Set ID.
setUser()  : mixed
Set user.
unsetByKey()  : $this
Unset data value by key.
updateAddressCounters()  : bool
Update segment address counters.
updateUseCounters()  : void
Update segment use counter.
upload()  : $this
Upload.

Constants

CODE_ALL

public mixed CODE_ALL = 'all'

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.

appendContactSetConnector()

Append contact set connector.

public appendContactSetConnector([int|null $contactSetId = null ]) : $this
Parameters
$contactSetId : int|null = null

Contact set ID.

Return values
$this

clearErrors()

Clear errors.

public clearErrors() : mixed

copy()

Copy.

public copy() : bool
Return values
bool

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.

getAddressCounter()

Get segment address counter.

public static getAddressCounter(int $segmentId) : DataCounter
Parameters
$segmentId : int

Segment ID.

Return values
DataCounter

getAddressCounters()

Get segment address counters.

public static getAddressCounters(array<string|int, int> $list) : array<string|int, mixed>
Parameters
$list : array<string|int, int>

List of ID.

Return values
array<string|int, mixed>

getData()

Get data.

public getData() : mixed

getDataClass()

Get data class.

public static getDataClass() : mixed
Tags
@return

null|MainDataManager;

getDefaultIds()

Get default segments.

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

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

getIdByCode()

Get segment ID by code.

public static getIdByCode(string|array<string|int, string> $code) : int|null
Parameters
$code : string|array<string|int, string>

Code.

Return values
int|null

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

isFilterOnly()

Is save filters only.

public isFilterOnly() : bool
Return values
bool

isHidden()

Return true if segment is hidden.

public isHidden() : bool
Return values
bool

isSystem()

Return true if segment is system.

public isSystem() : 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

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 letter ID.

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

Letter 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

setFilterOnlyMode()

Set save filter only mode.

public setFilterOnlyMode([bool $mode = true ]) : $this
Parameters
$mode : bool = true

Mode.

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;

unsetByKey()

Unset data value by key.

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

Key.

Return values
$this

updateAddressCounters()

Update segment address counters.

public static updateAddressCounters(int $segmentId, array<string|int, DataCounter$counters) : bool
Parameters
$segmentId : int

Segment ID.

$counters : array<string|int, DataCounter>

Counters.

Return values
bool

updateUseCounters()

Update segment use counter.

public static updateUseCounters(array<string|int, int> $list[, bool $isInclude = true ]) : void
Parameters
$list : array<string|int, int>

Segment ID list.

$isInclude : bool = true

Update include counters.

upload()

Upload.

public upload(array<string|int, mixed> $list) : $this
Parameters
$list : array<string|int, mixed>

List of emails and phones.

Return values
$this

        
On this page

Search results