Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 402] [Versions 400 and 403]

Textarea profile field define.

Copyright: 2020 Bas Brands <bas@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 95 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

profile_define_social:: (4 methods):
  define_form_common()
  define_after_data()
  define_validate_common()
  define_save_preprocess()


Class: profile_define_social  - X-Ref

Class profile_define_social.

define_form_common(&$form)   X-Ref
Prints out the form snippet for the part of creating or editing a profile field common to all data types.

param: moodleform $form instance of the moodleform class

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

param: moodleform $form

define_validate_common($data, $files)   X-Ref
Validate the data from the add/edit profile field form that is common to all data types.

Generally this method should not be overwritten by child classes.

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

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

This method is a hook for the child classes to overwrite.

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