Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 311 and 402] [Versions 311 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.

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

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.

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