Elgg  Version master
Protected Member Functions | List of all members
Elgg\Controllers\DownloadAction Class Reference

Helper class for download actions. More...

Inheritance diagram for Elgg\Controllers\DownloadAction:
Elgg\Controllers\GenericAction Elgg\Controllers\CsvDownloadAction Elgg\Controllers\JsonDownloadAction Elgg\Diagnostics\DownloadController

Protected Member Functions

 getFilename ()
 File name for download. More...
 
 getContents ()
 File contents. More...
 
 getMimeType ()
 Return the content mimetype for the Content-Type header. More...
 
 getHeaders ()
 Returns headers for download response. More...
 
 success ()
 {Will be used when an action is successfully finished.
Returns
OkResponse
} More...
 
- Protected Member Functions inherited from Elgg\Controllers\GenericAction
 sanitize ()
 Sanitizes input for the action. More...
 
 validate ()
 Validates the action. More...
 
 executeBefore ()
 Preparation before executing the action. More...
 
 execute ()
 Main part of the action. More...
 
 executeAfter ()
 Action part after the main execution. More...
 
 error (string $message)
 Will be used when something wrong happened during the handling of the action. More...
 

Additional Inherited Members

- Public Member Functions inherited from Elgg\Controllers\GenericAction
 __invoke (\Elgg\Request $request)
 Invoke the action steps. More...
 
- Protected Attributes inherited from Elgg\Controllers\GenericAction
Elgg Request $request
 

Detailed Description

Helper class for download actions.

Since
7.0

Definition at line 12 of file DownloadAction.php.

Member Function Documentation

◆ getContents()

Elgg\Controllers\DownloadAction::getContents ( )
abstractprotected

File contents.

Returns
mixed

Reimplemented in Elgg\Diagnostics\DownloadController, and Elgg\Controllers\CsvDownloadAction.

◆ getFilename()

Elgg\Controllers\DownloadAction::getFilename ( )
abstractprotected

◆ getHeaders()

Elgg\Controllers\DownloadAction::getHeaders ( )
protected

Returns headers for download response.

Returns
array

Definition at line 42 of file DownloadAction.php.

◆ getMimeType()

Elgg\Controllers\DownloadAction::getMimeType ( )
protected

Return the content mimetype for the Content-Type header.

Returns
string

Reimplemented in Elgg\Diagnostics\DownloadController, Elgg\Controllers\JsonDownloadAction, and Elgg\Controllers\CsvDownloadAction.

Definition at line 33 of file DownloadAction.php.

◆ success()

Elgg\Controllers\DownloadAction::success ( )
protected

{Will be used when an action is successfully finished.

Returns
OkResponse
}

Reimplemented from Elgg\Controllers\GenericAction.

Reimplemented in Elgg\Controllers\JsonDownloadAction.

Definition at line 51 of file DownloadAction.php.


The documentation for this class was generated from the following file: