Bitrix API

ResultItem implements JsonSerializable, ArrayAccess

FinalYes

Table of Contents

Interfaces

JsonSerializable
ArrayAccess

Methods

__construct()  : mixed
ResultItem constructor.
addLink()  : $this
Adds link on searched item.
getActions()  : array<string|int, mixed>
Returns actions.
getAttributes()  : array<string|int, mixed>
Returns attributes.
getId()  : mixed
Returns id.
getLinks()  : array<string|int, Uri>
Returns links on searched item.
getModule()  : string
Returns module which provides searched item.
getShowLink()  : Uri
Returns link to show searched item.
getSubTitle()  : string
Returns subtitle of searched item.
getTitle()  : string
Returns title of searched item.
getType()  : string|null
Returns type of element. For example: lead, deal, file, folder, etc.
jsonSerialize()  : mixed
Specify data which should be serialized to JSON
offsetExists()  : bool
Whether a offset exists
offsetGet()  : mixed
Offset to retrieve
offsetSet()  : void
Offset to set
offsetUnset()  : void
Offset to unset
setAttribute()  : $this
Sets value for attribute with name.
setAttributes()  : ResultItem
Sets attributes.
setId()  : ResultItem
Sets id.
setLinks()  : ResultItem
Sets links on searched item.
setModule()  : ResultItem
Sets module which provides searched item.
setShowLink()  : ResultItem
Sets link to show searched item.
setSubTitle()  : ResultItem
Sets subtitle of searched item.
setTitle()  : ResultItem
Sets title of searched item.
setType()  : ResultItem
Sets type of element. For example: lead, deal, file, folder, etc.
unsetAttribute()  : $this
Deletes attribute by name.

Methods

__construct()

ResultItem constructor.

public __construct(mixed $title, Uri|string $showLink[, null $id = null ]) : mixed
Parameters
$title : mixed
$showLink : Uri|string
$id : null = null

Adds link on searched item.

public addLink(string $name, Uri|string $link) : $this
Parameters
$name : string

Name of link.

$link : Uri|string

Link.

Return values
$this

getActions()

Returns actions.

public getActions() : array<string|int, mixed>

It's reserved field and unused.

Return values
array<string|int, mixed>

getAttributes()

Returns attributes.

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

Returns links on searched item.

public getLinks() : array<string|int, Uri>
Return values
array<string|int, Uri>

getModule()

Returns module which provides searched item.

public getModule() : string
Return values
string

Returns link to show searched item.

public getShowLink() : Uri
Return values
Uri

getSubTitle()

Returns subtitle of searched item.

public getSubTitle() : string

Subtitle is is unnecessary.

Return values
string

getTitle()

Returns title of searched item.

public getTitle() : string
Return values
string

getType()

Returns type of element. For example: lead, deal, file, folder, etc.

public getType() : string|null

Type is unnecessary.

Return values
string|null

offsetExists()

Whether a offset exists

public offsetExists(mixed $offset) : bool
Parameters
$offset : mixed

An offset to check for.

Tags
link
https://php.net/manual/en/arrayaccess.offsetexists.php
since
5.0.0
Return values
bool

true on success or false on failure.

The return value will be casted to boolean if non-boolean was returned.

setAttribute()

Sets value for attribute with name.

public setAttribute(string $name, mixed $value) : $this
Parameters
$name : string
$value : mixed
Return values
$this

setAttributes()

Sets attributes.

public setAttributes(array<string|int, mixed> $attributes) : ResultItem
Parameters
$attributes : array<string|int, mixed>
Return values
ResultItem

Sets links on searched item.

public setLinks(array<string|int, Uri>|array<string|int, string> $links) : ResultItem

Should be associative array.

Parameters
$links : array<string|int, Uri>|array<string|int, string>

Links.

Return values
ResultItem

setModule()

Sets module which provides searched item.

public setModule(string $module) : ResultItem

Module is unnecessary and will generate automatically.

Parameters
$module : string

Module id.

Return values
ResultItem

setSubTitle()

Sets subtitle of searched item.

public setSubTitle(string $subTitle) : ResultItem

Subtitle is is unnecessary.

Parameters
$subTitle : string

Subtitle.

Return values
ResultItem

setType()

Sets type of element. For example: lead, deal, file, folder, etc.

public setType(string $type) : ResultItem

Type is unnecessary.

Parameters
$type : string
Return values
ResultItem

unsetAttribute()

Deletes attribute by name.

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

        
On this page

Search results