Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
repository_contentbank\browser\contentbank_browser Class Reference

Base class for the content bank browsers. More...

Inheritance diagram for repository_contentbank\browser\contentbank_browser:
repository_contentbank\browser\contentbank_browser_context_course repository_contentbank\browser\contentbank_browser_context_coursecat repository_contentbank\browser\contentbank_browser_context_system

Public Member Functions

 can_access_content ()
 The required condition to enable the user to view/access the content bank content in this context.
 
 get_content ()
 Get all content nodes in the current context which can be viewed/accessed by the user.
 
 get_navigation ()
 Generate the full navigation to the current node.
 

Protected Member Functions

 allowed_child_context_levels ()
 Define the allowed child context levels.
 
 get_child_contexts ()
 Get the relevant child contexts.
 

Protected Attributes

context $context
 The current context.
 

Detailed Description

Base class for the content bank browsers.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ allowed_child_context_levels()

repository_contentbank\browser\contentbank_browser::allowed_child_context_levels ( )
abstractprotected

Define the allowed child context levels.

Return values
int[]The array containing the relevant child context levels

Reimplemented in repository_contentbank\browser\contentbank_browser_context_course, repository_contentbank\browser\contentbank_browser_context_coursecat, and repository_contentbank\browser\contentbank_browser_context_system.

◆ can_access_content()

repository_contentbank\browser\contentbank_browser::can_access_content ( )
abstract

The required condition to enable the user to view/access the content bank content in this context.

Return values
boolWhether the user can view/access the content bank content in the context

Reimplemented in repository_contentbank\browser\contentbank_browser_context_course, repository_contentbank\browser\contentbank_browser_context_coursecat, and repository_contentbank\browser\contentbank_browser_context_system.

◆ get_child_contexts()

repository_contentbank\browser\contentbank_browser::get_child_contexts ( )
protected

Get the relevant child contexts.

Return values
context[]The array containing the relevant, next-level children contexts

◆ get_content()

repository_contentbank\browser\contentbank_browser::get_content ( )

Get all content nodes in the current context which can be viewed/accessed by the user.

Return values
array[]The array containing all nodes which can be viewed/accessed by the user in the current context

◆ get_navigation()

repository_contentbank\browser\contentbank_browser::get_navigation ( )

Generate the full navigation to the current node.

Return values
array[]The array containing the path to each node in the navigation. Each navigation node is an array with keys: name, path.

The documentation for this class was generated from the following file: