Bitrix API

ElementTemplates extends BaseTemplate

Table of Contents

Methods

__construct()  : mixed
delete()  : void
Deletes templates for this entity from database.
findTemplates()  : array<string|int, mixed>
Returns templates for the entity and all it's parents.
get()  : array<string|int, mixed>
Returns array of templates stored for the entity from database.
getValuesEntity()  : BaseValues|null
Returns entity for which this template is executing.
hasTemplates()  : bool
Checks if entity has any templates stored in the database.
set()  : void
Stores templates for entity into database.

Methods

__construct()

public __construct(int $iblockId, int $elementId) : mixed
Parameters
$iblockId : int

Identifier of the iblock of element.

$elementId : int

Identifier of the element.

delete()

Deletes templates for this entity from database.

public delete() : void
Tags
throws
ArgumentException

findTemplates()

Returns templates for the entity and all it's parents.

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

Adds INHERITED flag to each template found.

Return values
array<string|int, mixed>

get()

Returns array of templates stored for the entity from database.

public get([BaseValues $entity = null ]) : array<string|int, mixed>
Parameters
$entity : BaseValues = null

Entity.

Tags
throws
ArgumentException
Return values
array<string|int, mixed>

hasTemplates()

Checks if entity has any templates stored in the database.

public hasTemplates(BaseValues $entity) : bool

Caches the result in static variable.

Parameters
$entity : BaseValues

Entity.

Tags
throws
ArgumentException
Return values
bool

set()

Stores templates for entity into database.

public set(array<string|int, mixed> $templates) : void
Parameters
$templates : array<string|int, mixed>

Templates to be stored to DB.

Tags
throws
ArgumentException

        
On this page

Search results