Open Journal Systems  3.3.0
QueryForm Class Reference
Inheritance diagram for QueryForm:
Form

Public Member Functions

 __construct ($request, $assocType, $assocId, $stageId, $queryId=null)
 
 execute (... $functionArgs)
 
 fetch ($request, $template=null, $display=false, $actionArgs=array())
 
 getAssocId ()
 
 getAssocType ()
 
 getQuery ()
 
 getStageId ()
 
 initData ()
 
 readInputData ()
 
 setAssocId ($assocId)
 
 setAssocType ($assocType)
 
 setQuery ($query)
 
 setStageId ($stageId)
 
- Public Member Functions inherited from Form
 __construct ($template=null, $callHooks=true, $requiredLocale=null, $supportedLocales=null)
 
 _decomposeArray ($name, $value, $stack)
 
 addCheck ($formValidator)
 
 addError ($field, $message)
 
 addErrorField ($field)
 
 addSupportedFormLocale ($supportedLocale)
 
 display ($request=null, $template=null)
 
 fetch ($request, $template=null, $display=false)
 
 getData ($key)
 
 getDefaultFormLocale ()
 
 getErrorsArray ()
 
 getLocaleFieldNames ()
 
 getRequiredLocale ()
 
 getTemplate ()
 
 isValid ()
 
 readUserVars ($vars)
 
 setData ($key, $value=null)
 
 setDefaultFormLocale ($defaultLocale)
 
 setTemplate ($template)
 
 validate ($callHooks=true)
 

Data Fields

 $_assocId
 
 $_assocType
 
 $_isNew
 
 $_query
 
 $_stageId
 
- Data Fields inherited from Form
 $_checks
 
 $_data
 
 $_errors
 
 $_template
 
 $cssValidation
 
 $defaultLocale
 
 $errorFields
 
 $errorsArray
 
 $formSectionErrors
 
 $requiredLocale
 
 $supportedLocales
 

Detailed Description

Form for adding/editing a new query.

Definition at line 18 of file QueryForm.inc.php.

Constructor & Destructor Documentation

◆ __construct()

QueryForm::__construct (   $request,
  $assocType,
  $assocId,
  $stageId,
  $queryId = null 
)

Constructor.

Parameters
$requestRequest
$assocTypeint ASSOC_TYPE_...
$assocIdint Assoc ID (per assocType)
$stageIdint WORKFLOW_STAGE_...
$queryIdint Optional query ID to edit. If none provided, a (potentially temporary) query will be created.

Definition at line 58 of file QueryForm.inc.php.

References Form\addCheck(), Core\getCurrentDate(), DAORegistry\getDAO(), setQuery(), and setStageId().

Member Function Documentation

◆ execute()

QueryForm::execute (   $functionArgs)

Execute the form's action. (Note that it is assumed that the form has already been validated.)

Parameters
mixed$functionArgs,...Arguments from the caller to be passed to the hook consumer
Returns
mixed Result from the consumer to be passed to the caller. Send a true-ish result if you want the caller to do something with the return value.

Reimplemented from Form.

Definition at line 346 of file QueryForm.inc.php.

References PKPServices\get(), PKPApplication\get(), DAORegistry\getDAO(), Form\getData(), and getQuery().

◆ fetch()

QueryForm::fetch (   $request,
  $template = null,
  $display = false,
  $actionArgs = array() 
)

Fetch the form.

See also
Form::fetch()
Parameters
$requestPKPRequest
$actionArgsarray Optional list of additional arguments

Definition at line 202 of file QueryForm.inc.php.

References PKPServices\get(), DAORegistry\getDAO(), PKPTemplateManager\getManager(), getQuery(), and AppLocale\requireComponents().

◆ getAssocId()

QueryForm::getAssocId ( )

Get assoc id

Returns
int

Definition at line 160 of file QueryForm.inc.php.

References Form\getData().

◆ getAssocType()

QueryForm::getAssocType ( )

Get assoc type

Returns
int ASSOC_TYPE_...

Definition at line 144 of file QueryForm.inc.php.

References Form\getData().

◆ getQuery()

QueryForm::getQuery ( )

Get the query

Returns
Query

Definition at line 112 of file QueryForm.inc.php.

References $_query.

Referenced by execute(), fetch(), and initData().

◆ getStageId()

QueryForm::getStageId ( )

Get the stage id

Returns
int

Definition at line 128 of file QueryForm.inc.php.

References $_stageId.

◆ initData()

QueryForm::initData ( )

Initialize form data from the associated author.

Reimplemented from Form.

Definition at line 179 of file QueryForm.inc.php.

References DAORegistry\getDAO(), and getQuery().

◆ readInputData()

QueryForm::readInputData ( )

Assign form data to user-submitted data.

See also
Form::readInputData()

Reimplemented from Form.

Definition at line 335 of file QueryForm.inc.php.

References Form\readUserVars().

◆ setAssocId()

QueryForm::setAssocId (   $assocId)

Set assoc id

Parameters
$assocIdint

Definition at line 168 of file QueryForm.inc.php.

References Form\setData().

◆ setAssocType()

QueryForm::setAssocType (   $assocType)

Set assoc type

Parameters
$assocTypeint ASSOC_TYPE_...

Definition at line 152 of file QueryForm.inc.php.

References Form\setData().

◆ setQuery()

QueryForm::setQuery (   $query)

Set the query

Parameters

Definition at line 120 of file QueryForm.inc.php.

Referenced by __construct().

◆ setStageId()

QueryForm::setStageId (   $stageId)

Set the stage id

Parameters
int

Definition at line 136 of file QueryForm.inc.php.

Referenced by __construct().

Field Documentation

◆ $_assocId

int QueryForm::$_assocId

Assoc ID (per _assocType)

Definition at line 29 of file QueryForm.inc.php.

◆ $_assocType

int QueryForm::$_assocType

ASSOC_TYPE_...

Definition at line 23 of file QueryForm.inc.php.

◆ $_isNew

boolean QueryForm::$_isNew

True iff this is a newly-created query

Definition at line 47 of file QueryForm.inc.php.

◆ $_query

Query QueryForm::$_query

The query being edited *

Definition at line 41 of file QueryForm.inc.php.

Referenced by getQuery().

◆ $_stageId

int QueryForm::$_stageId

The stage id associated with the query being edited *

Definition at line 35 of file QueryForm.inc.php.

Referenced by getStageId().


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