Bitrix API

FormLanding

Class FormLanding.

Table of Contents

Constants

LANDING_CODE_PRERIX  = 'crm_form_'
OPT_CODE_LANDINGS_SITE_ID  = 'forms_landing_site_id'
Option code for site id storage.
SITE_TYPE  = 'PAGE'
Landing site type.

Methods

__construct()  : mixed
Constructor.
canDelete()  : int|null
Get form ID by landing ID.
canUse()  : bool
Return true if it can be used.
createLanding()  : int|null
Creates new landing id.
deleteLanding()  : void
Delete landing.
getEditUrl()  : string
Returns edit url of landing by id.
getErrorMessage()  : string|null
Returns last error message if occurred.
getInstance()  : static
Get instance.
getPublicUrl()  : string|array<string|int, string>
Returns public url of landing by id.
getSiteId()  : int|null
Returns (creates if no exists) special site for Landing Form.

Constants

LANDING_CODE_PRERIX

public mixed LANDING_CODE_PRERIX = 'crm_form_'

OPT_CODE_LANDINGS_SITE_ID

Option code for site id storage.

public mixed OPT_CODE_LANDINGS_SITE_ID = 'forms_landing_site_id'

SITE_TYPE

Landing site type.

public mixed SITE_TYPE = 'PAGE'

Methods

__construct()

Constructor.

public __construct() : mixed

canDelete()

Get form ID by landing ID.

public canDelete(int $landingId) : int|null
Parameters
$landingId : int

Landing ID.

Return values
int|null

canUse()

Return true if it can be used.

public canUse() : bool
Return values
bool

createLanding()

Creates new landing id.

public createLanding(int $formId[, string $formName = null ]) : int|null
Parameters
$formId : int
  • ID of created form
$formName : string = null
  • Name of created form
Return values
int|null

deleteLanding()

Delete landing.

public deleteLanding(int $landingId) : void
Parameters
$landingId : int

Landing ID.

getEditUrl()

Returns edit url of landing by id.

public getEditUrl(int $landingId) : string
Parameters
$landingId : int

Landing id.

Return values
string

getErrorMessage()

Returns last error message if occurred.

public getErrorMessage() : string|null
Return values
string|null

getInstance()

Get instance.

public static getInstance() : static
Return values
static

getPublicUrl()

Returns public url of landing by id.

public getPublicUrl(int|array<string|int, int> $landingId) : string|array<string|int, string>
Parameters
$landingId : int|array<string|int, int>

Landing id.

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

getSiteId()

Returns (creates if no exists) special site for Landing Form.

public getSiteId() : int|null
Return values
int|null

        
On this page

Search results