OpenBroadcaster Documentation
models / ui_model.php



Manages the UI, finding core and theme image/CSS/JS files, user languages, and translation strings.

public  css_files ( args = [] )

Get core, theme, and enabled-module CSS files.

Returns css_files
private  find_files ( dir, ext = false, &$array = [] )

Recursive function to find files in a specific directory. If no valid directory is provided, the reference array will be returned unchanged (or an empty array if none is provided).

dir Directory to recursively find files in.
ext File extension to filter for.
array Reference to array to update with results. Results will be added to already existing array.
public  get_languages ( args = [] )

Get all available languages.

Returns languages
public  get_themes ( args = [] )

Get all available themes.

Returns themes
public  get_user_language ( args = [] )

Get the active language set for the current user. Returns FALSE if no language is set or no user is logged in.

Returns language
public  image_files ( args = [] )

Get core, theme, and enabled-module image files.

Returns image_files
public  js_files ( args = [] )

Get core and enabled-module JS files.

Returns js_files
public  strings ( args = [] )

Get translation strings for current user's active language. Returns an empty array if no strings are found or no user is logged in.

Returns strings