Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

The definition of a text area which can be exported.

Copyright: 2020 Andrew Nicols <andrew@nicols.co.uk>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 172 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

exportable_textarea:: (3 methods):
  __construct()
  add_to_archive()
  may_include_files()


Class: exportable_textarea  - X-Ref

The definition of a text area which can be exported.

__construct(context $context,string $component,string $uservisiblename,string $tablename,string $textfield,int $id,?string $textformatfield = null,?string $filearea = null,?int $itemid = null,?int $pluginfileitemid = null)   X-Ref
Create a new exportable_item instance.

If no filearea or itemid  is specified the no attempt will be made to export files.

param: context $context The context that this content belongs to
param: string $component The component that this textarea belongs to
param: string $uservisiblename The name displayed to the user when filtering
param: string $tablename The name of the table that this textarea is in
param: string $textfield The field within the tbale
param: int $id The id in the database
param: null|string $textformatfield The field in the database relating to the format field if one is present
param: null|string $filearea The name of the file area for files associated with this text area
param: null|int $itemid The itemid for files associated with this text area
param: null|int $pluginfileitemid The itemid to use when constructing the pluginfile URL

add_to_archive(zipwriter $archive)   X-Ref
Add the content to the archive.

param: zipwriter $archive

may_include_files()   X-Ref
Whether files may be included in this textarea.

Both a filearea, and itemid are required for files to be exportable.

return: bool