Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core\output\theme_usage Class Reference

Static Public Member Functions

static is_theme_used_in_any_context (string $themename)
 Check if the theme is used in any context (e.g.
 

Public Attributes

int const THEME_IS_NOT_USED = 0
 The theme is not used in context.
 
int const THEME_IS_USED = 1
 The theme is used in context.
 
string const THEME_USAGE_TYPE_ALL = 'all'
 The theme usage type for all.
 
string const THEME_USAGE_TYPE_CATEGORY = 'category'
 The theme usage type for categories.
 
string const THEME_USAGE_TYPE_COHORT = 'cohort'
 The theme usage type for cohorts.
 
string const THEME_USAGE_TYPE_COURSE = 'course'
 The theme usage type for courses.
 
string const THEME_USAGE_TYPE_USER = 'user'
 The theme usage type for users.
 

Detailed Description

Member Function Documentation

◆ is_theme_used_in_any_context()

static core\output\theme_usage::is_theme_used_in_any_context ( string $themename)
static

Check if the theme is used in any context (e.g.

user, course, cohort, category).

This query is cached.

Parameters
string$themenameThe theme to check.
Return values
intReturn 1 if at least one record was found, 0 if none.

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