Bitrix API

Helper

Table of Contents

Methods

clearCache()  : void
Cleans active A/B-test cache
deleteTest()  : bool
Deletes an A/B-test
getActiveTest()  : array<string|int, mixed>|null
Returns active A/B-test
getAlternative()  : string|null
Returns alternative test value for current A/B-test context
getContext()  : array<string|int, mixed>|null
Returns current A/B-test context
startTest()  : bool
Starts an A/B-test
stopTest()  : bool
Stops an A/B-test

Methods

clearCache()

Cleans active A/B-test cache

public static clearCache(int $siteId) : void
Parameters
$siteId : int

Site ID.

deleteTest()

Deletes an A/B-test

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

A/B-test ID.

Return values
bool

getActiveTest()

Returns active A/B-test

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

getAlternative()

Returns alternative test value for current A/B-test context

public static getAlternative(string $type, string $value) : string|null
Parameters
$type : string

Test type.

$value : string

Test original value.

Return values
string|null

getContext()

Returns current A/B-test context

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

startTest()

Starts an A/B-test

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

A/B-test ID.

Return values
bool

stopTest()

Stops an A/B-test

public static stopTest(int $id[, bool $auto = false ]) : bool
Parameters
$id : int

A/B-test ID.

$auto : bool = false

Auto-stop flag.

Return values
bool

        
On this page

Search results