SectionTemplates 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 $sectionId) : mixed
Parameters
- $iblockId : int
-
Identifier of the iblock of the section.
- $sectionId : int
-
Identifier of the section.
delete()
Deletes templates for this entity from database.
public
delete() : void
Tags
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
Return values
array<string|int, mixed>getValuesEntity()
Returns entity for which this template is executing.
public
getValuesEntity() : BaseValues|null
Return values
BaseValues|nullhasTemplates()
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
Return values
boolset()
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.