Здравствуйте! Столкнулась с проблемой в Moodle 2.0. Нужно в созданный мною новый блок добавить древовидную структуру с ссылками (аналогичную Навигации). Пробовала создать класс, который наследуется от block_tree, но не понимаю, как добавлять элементы дерева.
То, что нашла в документации:
- As of Moodle 2.0, if $this->content_type is BLOCK_TYPE_TREE, or if your block derives from block_tree, then $this->content is expected to have the following member variables:
- items This is an array of tree_item objects, representing the top level of the tree to be displayed. Each tree_item::children property may contain more tree_item objects for the next level down, which in turn contain more tree_item objects, and so on. Note that the tree block type has no footer
Может, кто работал с этим. Заранее спасибо за помощь!