CRM_Core_QuickForm_Action_Upload
extends CRM_Core_QuickForm_Action
in package
Redefine the upload action.
Tags
Table of Contents
Properties
- $_stateMachine : object
- Reference to the state machine i belong to.
- $_uploadDir : string
- The directory to store the uploaded files.
- $_uploadNames : array<string|int, mixed>
- The array of uploaded file names.
Methods
- __construct() : CRM_Core_QuickForm_Action_Upload
- Class constructor.
- perform() : mixed
- Processes the request.
- popUserContext() : mixed
- Returns the user to the top of the user context stack.
- realPerform() : mixed
- Real perform.
- upload() : mixed
- Upload and move the file if valid to the uploaded directory.
Properties
$_stateMachine
Reference to the state machine i belong to.
protected
object
$_stateMachine
$_uploadDir
The directory to store the uploaded files.
protected
string
$_uploadDir
$_uploadNames
The array of uploaded file names.
protected
array<string|int, mixed>
$_uploadNames
Methods
__construct()
Class constructor.
public
__construct(object &$stateMachine, string $uploadDir, array<string|int, mixed> $uploadNames) : CRM_Core_QuickForm_Action_Upload
Parameters
- $stateMachine : object
-
Reference to state machine object.
- $uploadDir : string
-
Directory to store the uploaded files.
- $uploadNames : array<string|int, mixed>
-
Element names of the various uploadable files.
Return values
CRM_Core_QuickForm_Action_Uploadperform()
Processes the request.
public
perform(CRM_Core_Form &$page, string $actionName) : mixed
Parameters
- $page : CRM_Core_Form
-
CRM_Core_Form the current form-page.
- $actionName : string
-
Current action name, as one Action object can serve multiple actions.
popUserContext()
Returns the user to the top of the user context stack.
public
popUserContext() : mixed
realPerform()
Real perform.
public
realPerform(CRM_Core_Form &$page, string $actionName) : mixed
Parameters
- $page : CRM_Core_Form
- $actionName : string
Tags
upload()
Upload and move the file if valid to the uploaded directory.
public
upload(CRM_Core_Form &$page, object &$data, string $pageName, string $uploadName) : mixed
Parameters
- $page : CRM_Core_Form
-
The CRM_Core_Form object.
- $data : object
-
The QFC data container.
- $pageName : string
-
The name of the page which index the data container with.
- $uploadName : string
-
The name of the uploaded file.