Stud.IP  5.4
StudipTreeNode Interface Reference
Inheritance diagram for StudipTreeNode:
RangeTreeNode StudipStudyArea

Public Member Functions

 getChildNodes (bool $onlyVisible=false)
 
 getId ()
 
 getName ()
 
 getDescription ()
 
 getImage ()
 
 hasChildNodes ()
 
 countCourses (string $semester_id='', int $semclass=0, bool $with_children=false)
 
 getCourses (string $semester_id='all', int $semclass=0, string $searchterm='', bool $with_children=false, array $courses=[])
 
 getAncestors ()
 

Static Public Member Functions

static getNode ($id)
 
static getCourseNodes (string $course_id)
 

Detailed Description

Interface StudipTreeNode An abstract representation of a tree node in Stud.IP

Author
Thomas Hackl hackl.nosp@m.@dat.nosp@m.a-que.nosp@m.st.d.nosp@m.e GPL2 or any later version
Since
Stud.IP 5.3

Member Function Documentation

◆ countCourses()

countCourses ( string  $semester_id = '',
int  $semclass = 0,
bool  $with_children = false 
)

How many courses are assigned to this node in the given semester?

Parameters
string$semester_id
int$semclass
bool$with_children
Returns
int

◆ getAncestors()

getAncestors ( )

Returns an array containing all ancestor nodes with id and name.

Returns
array

Implemented in StudipStudyArea, and RangeTreeNode.

◆ getChildNodes()

getChildNodes ( bool  $onlyVisible = false)

Get all direct children of the given node.

Parameters
bool$onlyVisiblefetch only visible nodes?
Returns
StudipTreeNode[]

Implemented in StudipStudyArea, and RangeTreeNode.

◆ getCourseNodes()

static getCourseNodes ( string  $course_id)
static

Fetches an array of all nodes the given course is assigned to.

Parameters
string$course_id
Returns
array

Implemented in StudipStudyArea, and RangeTreeNode.

◆ getCourses()

getCourses ( string  $semester_id = 'all',
int  $semclass = 0,
string  $searchterm = '',
bool  $with_children = false,
array  $courses = [] 
)

Fetches courses assigned to this node in the given semester.

Parameters
string$semester_id
int$semclass
string$searchterm
bool$with_children
string[]$courses
Returns
Course[]

◆ getDescription()

getDescription ( )

Optional description for this node.

Returns
string

Implemented in StudipStudyArea, and RangeTreeNode.

◆ getId()

getId ( )

This node's unique ID.

Returns
mixed

◆ getImage()

getImage ( )

Gets an optional Image (Icon or Avatar) for this node.

Returns
Icon|Avatar|null

Implemented in StudipStudyArea, and RangeTreeNode.

◆ getName()

getName ( )

A name (=label) for this node.

Returns
string

Implemented in StudipStudyArea, and RangeTreeNode.

◆ getNode()

static getNode (   $id)
static

Fetches a node by the given ID. The implementing class knows what to do.

Parameters
mixed$id
Returns
StudipTreeNode

Implemented in StudipStudyArea, and RangeTreeNode.

◆ hasChildNodes()

hasChildNodes ( )

Indicator if this node has children.

Returns
bool

Implemented in StudipStudyArea, and RangeTreeNode.


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