1C-Bitrix 25.700.0
|
Открытые статические члены | |
static | Add ($arFields, $isCourse=false, $parentLessonId=true, $arProperties=array('SORT'=> 500)) |
static | Update ($id, $arFields) |
static | Delete ($id) |
static | DeleteRecursiveLikeHardlinks ($id) |
static | GetByIDAsArr ($id) |
static | GetByID ($id) |
static | GetList ($arOrder=array(), $arFilter=array()) |
static | GetListOfImmediateParents ($lessonId, $arOrder=array(), $arFilter=array(), $arSelectFields=array()) |
static | GetListOfImmediateChilds ($lessonId, $arOrder=array(), $arFilter=array(), $arSelectFields=array()) |
static | ListImmediateParents ($lessonId) |
static | ListImmediateChilds ($lessonId) |
static | ListImmediateNeighbours ($lessonId) |
static | GetLinkedCourse ($lessonId) |
static | GetTree ( $lessonId, $arOrder=array('EDGE_SORT'=> 'asc'), $arFilter=array(), $publishProhibitionMode=true) |
static | RelationAdd ($parentLessonId, $childLessonId, $arProperties) |
static | RelationUpdate ($parentLessonId, $childLessonId, $arProperties) |
static | RelationGet ($parentLessonId, $childLessonId) |
static | RelationRemove ($parentLessonId, $childLessonId) |
static | CountImmediateChilds ($lessonId) |
static | GetListOfParentPathes ($lessonId, $breakOnLessonId=false, $breakBeforeLessonId=false, $arIgnoreEdges=array()) |
static | IsPublishProhibited ($lessonId, $contextCourseLessonId) |
static | PublishProhibitionSetTo ($lessonId, $contextCourseLessonId, $isProhibited) |
Note: usually in phpDoc blocks for methods listed not all exceptions, that can be throwed by them.
@access public
См. определение в файле clearnlesson.php строка 9
|
static |
WARNING: second param ($isCourse) must be always set to FALSE, because it's is for internal use only. If you want to create course, use CCourse\Add instead.
Creates new lesson
WARNING: this method terminates (by die()/exit()) current execution flow when SQL server error occured. It's due to bug in CDatabase::Insert() 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 )
array | of pairs field => value for new lesson. Allowed fields are ACTIVE, ACTIVE, true by default, available values are: true/false NAME, mustn't be omitted CODE, NULL by default PREVIEW_PICTURE, NULL by default, available value is array ('name' => ..., 'size' => ..., 'tmp_name' => ..., 'type' => ..., 'del' => ...) PREVIEW_TEXT, NULL by default PREVIEW_TEXT_TYPE, 'text' by default, available values are: 'text', 'html' DETAIL_PICTURE, NULL by default, available value is array ('name' => ..., 'size' => ..., 'tmp_name' => ..., 'type' => ..., 'del' => ...) DETAIL_TEXT, NULL by default DETAIL_TEXT_TYPE, 'text' by default, available values are: 'text', 'html', 'file' (filename in LAUNCH) LAUNCH, NULL by default |
bool | flag of course. If FALSE (default) lesson is not course, if TRUE created lesson will be the course (in this case arguments $parentLessonId and $arProperties are ignored, and $arFields can contain additional fields (any can be omitted):
|
integer/bool | id of immediate parent lesson. Default value is TRUE, what means "no immediate parent". |
array | of properties in relation to parent lesson: array ('SORT' => sort_order) |
LearnException | with errcodes bit set (one of):
|
|
static |
Counts how much immediate childs given lesson has.
int | id of lesson |
Замещается в CLearnLesson.
|
static |
Removes lesson and all relations from/to it.
integer/array. | If not array => param interpreted as id of lesson to be removed. If array => param interpreted as array of params. Available params are:
|
LearnException | with errcode bit set LearnException\EXC_ERR_GN_REMOVE, also errmsg === 'EA_NOT_EXISTS' if there is wasn't node with this id. |
Замещается в CLearnLesson.
|
static |
Detach the given lesson from all parents and recursively remove descendants, excepts descendants, that have ancestors outside of descendants of the given lesson. Such lessons will not be removed, but will be unlinked from lessons, which will be really removed.
integer/array. | If not array => param interpreted as id of lesson to be removed. If array => param interpreted as array of params. Available params are:
|
Замещается в CLearnLesson.
|
static |
LearnException | with error bit set EXC_ERR_ALL_PARAMS |
Замещается в CLearnLesson.
|
static |
WARNING: don't use this function, it's for internal use only.
integer | id of node to be getted |
LearnException | with errcode bit set LearnException\EXC_ERR_GN_GETBYID. Messages can be: 'EA_PARAMS', 'EA_ACCESS_DENIED', 'EA_SQLERROR', 'EA_NOT_EXISTS'. |
@access private
Замещается в CLearnLesson.
|
static |
Gets id of course corresponded to given lesson
integer | id of lesson |
LearnException | with error bit set (one of): |
Замещается в CLearnLesson.
|
static |
int | id of parent lesson |
array | order (see format in comment for ThisClass::GetList()) |
array | filter (see format in comment for ThisClass::GetList()) |
array | list of fields to be selected. If empty => selects all fields. |
LearnException | with error bit set EXC_ERR_ALL_PARAMS |
|
static |
int | id of child lesson |
array | order (see format in comment for ThisClass::GetList()) |
array | filter (see format in comment for ThisClass::GetList()) |
array | list of fields to be selected. If empty => selects all fields. |
LearnException | with error bit set EXC_ERR_ALL_PARAMS |
|
static |
Lists all pathes to given lesson. Given lesson not included in pathes.
int | lesson id to be started from |
int/bool | id of breakpoint-lesson (root lesson). It means, this lesson will be interpreted as parentless lesson. If param is false (it's by default) - than this argument will be ignored. |
int/bool | id of pre-breakpoint-lesson. It means, this lesson will not be included in pathes (all childs of this lesson will be interpreted as parentless lessons). If param is false (it's by default) - than this argument will be ignored. |
array | of edges to be ignored (interpreted as non-existing). array must be array of such arrays: ('PARENT_LESSON' => #id#, 'CHILD_LESSON' => #id#) |
Замещается в CLearnLesson.
|
static |
Build tree of lessons with the given root. WARNING: tree build algorithm skips duplicated lessons, so if there is some duplicates lessons, only one of them will be in resulted tree.
integer | id of root lesson |
array | order (by default: array('EDGE_SORT' => 'asc')) |
array | Filter for lessons |
bool | public prohibition mode flag. If set to TRUE, than all lessons (and they descendants) that are public prohibited in context of a course with lesson_id == $lessonId will be skipped during tree building. |
|
static |
Checks for probition of publishing for given lesson in context of given course.
int | lesson id to be checked for publish prohibition |
int | lesson id in context of which check. Must corresponds to course. |
Замещается в CLearnLesson.
|
static |
Lists immediate childs.
integer | id of lesson |
Замещается в CLearnLesson.
|
static |
Lists immediate neighbours.
integer | id of lesson |
Замещается в CLearnLesson.
|
static |
Замещается в CLearnLesson.
|
static |
int | lesson id for publish (un)prohibition |
int | lesson id in context of which publish (un)prohibition will be done |
bool | if true - lesson will be prohibited for publish. If false - prohibition will be removed. |
Замещается в CLearnLesson.
|
static |
Link two lessons from $parentLessonId to $childLessonId
int | $parentLessonId | |
int | $childLessonId | |
array | of properties of the link. Currently available properties:
|
Exception | LearnException with code error bit set LearnException\EXC_ERR_GR_LINK |
Замещается в CLearnLesson.
|
static |
Get parametres of relation between two lessons
int | $parentLessonId | |
int | $childLessonId |
Exception | LearnException with code error bit set LearnException\EXC_ERR_GR_GET_PROPERTY |
Замещается в CLearnLesson.
|
static |
Remove relation from $parentLessonId to $childLessonId
int | $parentLessonId | |
int | $childLessonId |
Exception | LearnException with code error bit set LearnException\EXC_ERR_GR_UNLINK if relation isn't exists => message of exception === 'EA_NOT_EXISTS' |
Замещается в CLearnLesson.
|
static |
Update parametres of relation between two lessons
int | $parentLessonId | |
int | $childLessonId | |
array | of properties of the link. Currently available properties:
|
Exception | LearnException with code error bit set LearnException\EXC_ERR_GR_SET_PROPERTY |
Замещается в CLearnLesson.
|
static |
Changes lesson's data
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 )
integer | id of node to be updated |
array | of pairs field => value for lesson If lesson is the course, additional fields maybe set:
|
LearnException | with errcodes bit set (one of):
|
Замещается в CLearnLesson.