Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Static Public Member Functions | List of all members
core_privacy\local\request\transform Class Reference

A class containing a set of data transformations for core data types. More...

Static Public Member Functions

static date ($date)
 Translate a unix timestamp into a date string. More...
 
static datetime ($datetime)
 Translate a unix timestamp into a datetime string. More...
 
static user (int $userid)
 Translate a userid into the standard user format for exports. More...
 
static yesno ($value)
 Translate a bool or int (0/1) value into a translated yes/no string. More...
 

Detailed Description

A class containing a set of data transformations for core data types.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ date()

static core_privacy\local\request\transform::date (   $date)
static

Translate a unix timestamp into a date string.

Parameters
int$datethe unixtimestamp to translate.
Return values
stringThe translated string.

◆ datetime()

static core_privacy\local\request\transform::datetime (   $datetime)
static

Translate a unix timestamp into a datetime string.

Parameters
int$datetimethe unixtimestamp to translate.
Return values
stringThe translated string.

◆ user()

static core_privacy\local\request\transform::user ( int  $userid)
static

Translate a userid into the standard user format for exports.

We have not determined if we will do this or not, but we provide the functionality and encourgae people to use it so that it can be retrospectively fitted if required.

Parameters
int$useridthe userid to translate
Return values
mixed

◆ yesno()

static core_privacy\local\request\transform::yesno (   $value)
static

Translate a bool or int (0/1) value into a translated yes/no string.

Parameters
bool$valueThe value to translate
Return values
string

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