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

Public Member Functions

 __construct ($contextId, $typeId=null)
 
 execute (... $functionArgs)
 
 fetch ($request, $template='controllers/grid/announcements/form/announcementTypeForm.tpl', $display=false)
 
 getLocaleFieldNames ()
 
 initData ()
 
 readInputData ()
 
- 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)
 
 getData ($key)
 
 getDefaultFormLocale ()
 
 getErrorsArray ()
 
 getRequiredLocale ()
 
 getTemplate ()
 
 isValid ()
 
 readUserVars ($vars)
 
 setData ($key, $value=null)
 
 setDefaultFormLocale ($defaultLocale)
 
 setTemplate ($template)
 
 validate ($callHooks=true)
 

Data Fields

 $contextId
 
 $typeId
 
- Data Fields inherited from Form
 $_checks
 
 $_data
 
 $_errors
 
 $_template
 
 $cssValidation
 
 $defaultLocale
 
 $errorFields
 
 $errorsArray
 
 $formSectionErrors
 
 $requiredLocale
 
 $supportedLocales
 

Detailed Description

Form for manager to create/edit announcement types.

See also
AnnouncementType

Definition at line 20 of file AnnouncementTypeForm.inc.php.

Constructor & Destructor Documentation

◆ __construct()

AnnouncementTypeForm::__construct (   $contextId,
  $typeId = null 
)

Constructor

Parameters
$contextIdint Context ID
$typeIdint leave as default for new announcement type

Definition at line 38 of file AnnouncementTypeForm.inc.php.

References $contextId, $typeId, and Form\addCheck().

Member Function Documentation

◆ execute()

AnnouncementTypeForm::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 99 of file AnnouncementTypeForm.inc.php.

References Application\getContextAssocType(), DAORegistry\getDAO(), and Form\getData().

◆ fetch()

AnnouncementTypeForm::fetch (   $request,
  $template = 'controllers/grid/announcements/form/announcementTypeForm.tpl',
  $display = false 
)

Returns a string of the rendered form

Parameters
$requestPKPRequest
$templatestring the template to be rendered, mandatory if no template has been specified on class instantiation.
$displayboolean
Returns
string the rendered form

Reimplemented from Form.

Definition at line 63 of file AnnouncementTypeForm.inc.php.

References PKPTemplateManager\getManager().

◆ getLocaleFieldNames()

AnnouncementTypeForm::getLocaleFieldNames ( )

Get a list of localized field names for this form

Returns
array

Reimplemented from Form.

Definition at line 55 of file AnnouncementTypeForm.inc.php.

References DAORegistry\getDAO().

◆ initData()

AnnouncementTypeForm::initData ( )

Initialize form data from current announcement type.

Reimplemented from Form.

Definition at line 72 of file AnnouncementTypeForm.inc.php.

References DAORegistry\getDAO().

◆ readInputData()

AnnouncementTypeForm::readInputData ( )

Assign form data to user-submitted data.

Reimplemented from Form.

Definition at line 91 of file AnnouncementTypeForm.inc.php.

References Form\readUserVars().

Field Documentation

◆ $contextId

int AnnouncementTypeForm::$contextId

Context ID

Definition at line 25 of file AnnouncementTypeForm.inc.php.

Referenced by __construct().

◆ $typeId

typeId AnnouncementTypeForm::$typeId

int the ID of the announcement type being edited

Definition at line 31 of file AnnouncementTypeForm.inc.php.

Referenced by __construct().


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