The definition of a set of files in a filearea to be exported.
More...
|
| __construct (context $context, string $component, string $uservisiblename, string $filearea, int $itemid, ?int $pluginfileitemid=null, string $folderpath='') |
| Create a new exportable_item instance.
|
|
| add_to_archive (zipwriter $archive) |
| Add the content to the archive.
|
|
| get_component () |
| Get the component that this exportable item relates to.
|
|
| get_context () |
| Get the context that this exportable item is for.
|
|
| get_user_visible_name () |
| Get the user visible name for the exportable item.
|
|
|
string | $component = null |
| The component being exported.
|
|
context | $context = null |
| The context associated with this exportable item.
|
|
string | $filearea |
| $filearea The file to be exported
|
|
string | $folderpath |
| The destination path of the text content.
|
|
bool int | $itemid |
| The itemid in the Files API.
|
|
int | $pluginfileitemid |
| The itemid to use in the pluginfile URL.
|
|
string | $uservisiblename = null |
| The name displayed to the user.
|
|
The definition of a set of files in a filearea to be exported.
All files mustbe in a single filearea and itemid combination.
- Copyright
- 2020 Andrew Nicols andre.nosp@m.w@ni.nosp@m.cols..nosp@m.co.u.nosp@m.k
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
core\content\export\exportable_items\exportable_filearea::__construct |
( |
context | $context, |
|
|
string | $component, |
|
|
string | $uservisiblename, |
|
|
string | $filearea, |
|
|
int | $itemid, |
|
|
?int | $pluginfileitemid = null, |
|
|
string | $folderpath = '' ) |
Create a new exportable_item instance.
If no filearea or itemid is specified the no attempt will be made to export files.
- Parameters
-
context | $context | The context that this content belongs to |
string | $component | |
string | $uservisiblename | The name displayed to the user when filtering |
string | $filearea | The file area in the Files API where these files are located |
int | $itemid | The itemid in the Files API where these files are located |
null | int | $pluginfileitemid | The itemid as used in the Pluginfile URL |
string | $folderpath | Any sub-directory to place files in |
◆ add_to_archive()
core\content\export\exportable_items\exportable_filearea::add_to_archive |
( |
zipwriter | $archive | ) |
|
◆ get_component()
core\content\export\exportable_item::get_component |
( |
| ) |
|
|
inherited |
Get the component that this exportable item relates to.
- Return values
-
◆ get_context()
core\content\export\exportable_item::get_context |
( |
| ) |
|
|
inherited |
Get the context that this exportable item is for.
- Return values
-
◆ get_filepath_for_file()
core\content\export\exportable_items\exportable_filearea::get_filepath_for_file |
( |
stored_file | $file | ) |
|
|
protected |
Get the filepath for the specified stored_file.
- Parameters
-
- Return values
-
string | The generated filepath |
◆ get_pluginfile_url_for_stored_file()
static core\content\export\exportable_items\exportable_filearea::get_pluginfile_url_for_stored_file |
( |
stored_file | $file, |
|
|
?int | $pluginfileitemid ) |
|
staticprotected |
Get the pluginfile URL for a stored file.
Note: The itemid in the pluginfile may be omitted in some URLs, despite an itemid being present in the database. Equally, the itemid in the URL may not match the itemid in the files table.
The pluginfileitemid argument provided to this function is the variant in the URL, and not the one in the files table.
- Parameters
-
stored_file | $file | The file whose link will be generated |
null | int | $pluginfileitemid | The itemid of the file in pluginfile URL. |
◆ get_user_visible_name()
core\content\export\exportable_item::get_user_visible_name |
( |
| ) |
|
|
inherited |
Get the user visible name for the exportable item.
- Return values
-
The documentation for this class was generated from the following file:
- lib/classes/content/export/exportable_items/exportable_filearea.php