Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 39 and 401]

This file contains the datetime profile field definition class.

Copyright: 2010 Mark Nelson <markn@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU Public License
File Size: 179 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

profile_define_datetime:: (4 methods):
  define_form_specific()
  define_validate_specific()
  define_after_data()
  define_save_preprocess()


Class: profile_define_datetime  - X-Ref

Define datetime fields.

define_form_specific($form)   X-Ref
Define the setting for a datetime custom field.

param: moodleform $form the user form

define_validate_specific($data, $files)   X-Ref
Validate the data from the profile field form.

param: stdClass $data from the add/edit profile field form
param: array $files
return: array associative array of error messages

define_after_data(&$mform)   X-Ref
Alter form based on submitted or existing data.

param: moodleform $mform

define_save_preprocess($data)   X-Ref
Preprocess data from the profile field form before
it is saved.

param: stdClass $data from the add/edit profile field form
return: stdClass processed data object