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
- Copyright
- Stud.IP core group
- Since
- Stud.IP 3.2
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 | $url | The assets url to compress |
- Returns
- String containing the compressed assets url
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 | $navigation | The navigation object |
String | $path | Current path segment |
array | $activated | Activated items |
String | null | $cid | Optional context ID |
- Returns
- Array containing the children (+ grandchildren...)
static getMyCoursesNavigation |
( |
|
$activated | ) |
|
|
staticprotected |
Specialty for responsive navigation: build navigation items for my courses in current semester.
- Returns
- array
static getNavigationArray |
( |
| ) |
|
|
static |
Returns the current navigation as an array.
- Returns
- Array containing the navigation
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
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 | $url | The url to compress |
- Returns
- String containing the compressed url
The documentation for this class was generated from the following file: