1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс CLearnGraphRelation
Граф наследования:CLearnGraphRelation:
ILearnGraphRelation

Открытые статические члены

static ListImmediateParents ($nodeId)
static ListImmediateChilds ($nodeId)
static ListImmediateNeighbours ($nodeId)
static Link ($parentNodeId, $childNodeId, $arProperties)
static Unlink ($parentNodeId, $childNodeId)
static SetProperty ($parentNodeId, $childNodeId, $propertyName, $value)
static GetProperty ($parentNodeId, $childNodeId, $propertyName)

Поля данных

const NBRS_IMDT_PARENTS = 0x1
const NBRS_IMDT_CHILDS = 0x2

Защищенные статические члены

static _ListImmediateNeighbours ($nodeId, $bitmaskSearchMode)

Подробное описание

WARNING: nobody shouldn't rely on this code, because it's FOR INTERNAL USE ONLY. Any declared function can be removed or changed in future versions. This code can be changed without any notifications. DON'T USE it nowhere.

@access private

Примеры
C:/bitrix/modules/learning/classes/general/ilearngraphrelation.php.

См. определение в файле ilearngraphrelation.php строка 146

Методы

◆ _ListImmediateNeighbours()

_ListImmediateNeighbours ( $nodeId,
$bitmaskSearchMode )
staticprotected
Примеры
C:/bitrix/modules/learning/classes/general/ilearngraphrelation.php.

См. определение в файле ilearngraphrelation.php строка 171

◆ GetProperty()

GetProperty ( $parentNodeId,
$childNodeId,
$propertyName )
static

Get property for relation from $parentNodeId to $childNodeId.

Аргументы
int$parentNodeId
int$childNodeId
string$propertyName('SORT')
Исключения
ExceptionLearnException with code error LearnException\EXC_ERR_GR_GET_PROPERTY if relation isn't exists => message of exception === 'EA_NOT_EXISTS'
Возвращает
mixed value of property (for 'SORT' - integer)

Замещает ILearnGraphRelation.

Примеры
C:/bitrix/modules/learning/classes/general/clearnlesson.php и C:/bitrix/modules/learning/classes/general/ilearngraphrelation.php.

См. определение в файле ilearngraphrelation.php строка 370

◆ Link()

Link ( $parentNodeId,
$childNodeId,
$arProperties )
static

Link two nodes from $parentNodeId to $childNodeId

Аргументы
int$parentNodeId
int$childNodeId
arrayof properties of the link. Currently available properties:
  • 'SORT', 32-bit integer
Исключения
ExceptionLearnException with code error LearnException\EXC_ERR_GR_LINK

Замещает ILearnGraphRelation.

Примеры
C:/bitrix/modules/learning/classes/general/clearnlesson.php и C:/bitrix/modules/learning/classes/general/ilearngraphrelation.php.

См. определение в файле ilearngraphrelation.php строка 234

◆ ListImmediateChilds()

ListImmediateChilds ( $nodeId)
static

Lists immediate childs

Аргументы
integerid of node
Возвращает
array of immediate childs (empty array if there is no childs)
См. также
example for ListImmediateNeighbours()

Замещает ILearnGraphRelation.

Примеры
C:/bitrix/modules/learning/classes/general/clearnlesson.php и C:/bitrix/modules/learning/classes/general/ilearngraphrelation.php.

См. определение в файле ilearngraphrelation.php строка 161

◆ ListImmediateNeighbours()

ListImmediateNeighbours ( $nodeId)
static

◆ ListImmediateParents()

ListImmediateParents ( $nodeId)
static

Lists immediate parents

Аргументы
integerid of node
Возвращает
array of immediate parents (empty array if there is no parents)
См. также
example for ListImmediateNeighbours()

Замещает ILearnGraphRelation.

Примеры
C:/bitrix/modules/learning/classes/general/clearnlesson.php и C:/bitrix/modules/learning/classes/general/ilearngraphrelation.php.

См. определение в файле ilearngraphrelation.php строка 156

◆ SetProperty()

SetProperty ( $parentNodeId,
$childNodeId,
$propertyName,
$value )
static

Set property for relation from $parentNodeId to $childNodeId. Currently available properties:

  • 'SORT', 32-bit integer

Warning: this method DON'T checks for existence of relation (due to CDatabase transactions problems), and it will not give any error or exception in that case.

WARNING: this method terminates (by die()/exit()) current execution flow when SQL server error occured. It's due to bug in CDatabase::Update() in main module (version info: define("SM_VERSION","11.0.12"); define("SM_VERSION_DATE","2012-02-21 17:00:00"); // YYYY-MM-DD HH:MI:SS )

Аргументы
int$parentNodeId
int$childNodeId
string$propertyName('SORT')
mixed$value(for 'SORT' - integer)
Исключения
ExceptionLearnException with code error LearnException\EXC_ERR_GR_SET_PROPERTY

This code will be useful after bug in CDatabase::Update() will be solved and $ignore_errors setted to true in Update() call above.

Замещает ILearnGraphRelation.

Примеры
C:/bitrix/modules/learning/classes/general/clearnlesson.php и C:/bitrix/modules/learning/classes/general/ilearngraphrelation.php.

См. определение в файле ilearngraphrelation.php строка 311

◆ Unlink()

Unlink ( $parentNodeId,
$childNodeId )
static

Remove relation from $parentNodeId to $childNodeId

Аргументы
int$parentNodeId
int$childNodeId
Исключения
ExceptionLearnException with code error LearnException\EXC_ERR_GR_UNLINK if relation isn't exists => message of exception === 'EA_NOT_EXISTS'

Замещает ILearnGraphRelation.

Примеры
C:/bitrix/modules/learning/classes/general/clearnlesson.php и C:/bitrix/modules/learning/classes/general/ilearngraphrelation.php.

См. определение в файле ilearngraphrelation.php строка 281

Поля

◆ NBRS_IMDT_CHILDS

const NBRS_IMDT_CHILDS = 0x2
Примеры
C:/bitrix/modules/learning/classes/general/ilearngraphrelation.php.

См. определение в файле ilearngraphrelation.php строка 150

◆ NBRS_IMDT_PARENTS

const NBRS_IMDT_PARENTS = 0x1
Примеры
C:/bitrix/modules/learning/classes/general/ilearngraphrelation.php.

См. определение в файле ilearngraphrelation.php строка 149


Объявления и описания членов класса находятся в файле: