Stud.IP  5.4
ResponsiveHelper Class Reference

Static Public Member Functions

static getNavigationArray ()
 
static getNavigationObject (string $stored_hash=null)
 

Static Protected Member Functions

static getChildren (Navigation $navigation, $path, &$activated=[], string $cid=null)
 
static getURL ($url, $params=[])
 
static getAssetsURL ($url)
 
static getMyCoursesNavigation ($activated)
 

Detailed Description

ResponsiveHelper.php

This class collects helper methods for Stud.IP's responsive design.

Author
Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m GPL2 or any later version
Since
Stud.IP 3.2

Member Function Documentation

◆ getAssetsURL()

static getAssetsURL (   $url)
staticprotected

Try to get a compressed version of the passed assets url. The absolute uri of the Stud.IP installation is stripped from the url.

Parameters
String$urlThe assets url to compress
Returns
String containing the compressed assets url

◆ getChildren()

static getChildren ( Navigation  $navigation,
  $path,
$activated = [],
string  $cid = null 
)
staticprotected

Recursively build a navigation array from the subnavigation/children of a navigation object.

Parameters
Navigation$navigationThe navigation object
String$pathCurrent path segment
array$activatedActivated items
String | null$cidOptional context ID
Returns
Array containing the children (+ grandchildren...)

◆ getMyCoursesNavigation()

static getMyCoursesNavigation (   $activated)
staticprotected

Specialty for responsive navigation: build navigation items for my courses in current semester.

Returns
array

◆ getNavigationArray()

static getNavigationArray ( )
static

Returns the current navigation as an array.

Returns
Array containing the navigation

◆ getNavigationObject()

static getNavigationObject ( string  $stored_hash = null)
static

Returns the navigation object required for the Vue.js component.

The object will always contain the currently selected navigation path. Besides that, the object may contain the whole navigation and a hash for that navigation. If a hash is passed and it matches the currently genereated hash, the navigation and hash will be omitted from the response for performance reasons. We don't want to include the large navigation object in every response.

Returns
array

◆ getURL()

static getURL (   $url,
  $params = [] 
)
staticprotected

Try to get a compressed version of the passed navigation url. The URL is processed is processed by URLHelper and the absolute uri of the Stud.IP installation is stripped from it afterwards.

Parameters
String$urlThe url to compress
Returns
String containing the compressed url

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