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

Public Member Functions

 __construct ($contextId, $categoryId=null)
 
 execute (... $functionArgs)
 
 fetch ($request, $template=null, $display=false)
 
 getCategoryId ()
 
 getContextId ()
 
 getLocaleFieldNames ()
 
 initData ()
 
 readInputData ()
 
 setCategoryId ($categoryId)
 
 validate ($callHooks=true)
 
- 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)
 

Data Fields

 $_categoryId
 
 $_contextId
 
 $_imageExtension
 
 $_sizeArray
 
 $_userId
 
- Data Fields inherited from Form
 $_checks
 
 $_data
 
 $_errors
 
 $_template
 
 $cssValidation
 
 $defaultLocale
 
 $errorFields
 
 $errorsArray
 
 $formSectionErrors
 
 $requiredLocale
 
 $supportedLocales
 

Detailed Description

Form to add/edit category.

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

Constructor & Destructor Documentation

◆ __construct()

CategoryForm::__construct (   $contextId,
  $categoryId = null 
)

Constructor.

Parameters
$contextIdContext id.
$categoryIdCategory id.

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

References Form\addCheck(), PKPApplication\get(), and DAORegistry\getDAO().

Member Function Documentation

◆ execute()

CategoryForm::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 234 of file CategoryForm.inc.php.

References $_imageExtension, PKPApplication\get(), getCategoryId(), getContextId(), Core\getCurrentDate(), DAORegistry\getDAO(), Form\getData(), and setCategoryId().

◆ fetch()

CategoryForm::fetch (   $request,
  $template = null,
  $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 175 of file CategoryForm.inc.php.

References PKPServices\get(), getCategoryId(), DAORegistry\getDAO(), and PKPTemplateManager\getManager().

◆ getCategoryId()

CategoryForm::getCategoryId ( )

Get the category id.

Returns
int categoryId

Definition at line 86 of file CategoryForm.inc.php.

References $_categoryId.

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

◆ getContextId()

CategoryForm::getContextId ( )

Get the context id.

Returns
int contextId

Definition at line 102 of file CategoryForm.inc.php.

References $_contextId.

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

◆ getLocaleFieldNames()

CategoryForm::getLocaleFieldNames ( )

Get all locale field names

Reimplemented from Form.

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

References DAORegistry\getDAO().

◆ initData()

CategoryForm::initData ( )
See also
Form::initData()

Reimplemented from Form.

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

References getCategoryId(), getContextId(), DAORegistry\getDAO(), and Form\setData().

◆ readInputData()

CategoryForm::readInputData ( )

◆ setCategoryId()

CategoryForm::setCategoryId (   $categoryId)

Set the category ID for this section.

Parameters
$categoryIdint

Definition at line 94 of file CategoryForm.inc.php.

Referenced by execute().

◆ validate()

CategoryForm::validate (   $callHooks = true)
See also
Form::validate()

Reimplemented from Form.

Definition at line 140 of file CategoryForm.inc.php.

References Form\addError(), DAORegistry\getDAO(), and Form\getData().

Field Documentation

◆ $_categoryId

Id CategoryForm::$_categoryId

of the category being edited

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

Referenced by getCategoryId().

◆ $_contextId

The CategoryForm::$_contextId

context ID of the category being edited

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

Referenced by getContextId().

◆ $_imageExtension

$_imageExtension CategoryForm::$_imageExtension

string Cover image extension

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

Referenced by execute().

◆ $_sizeArray

$_sizeArray CategoryForm::$_sizeArray

array Cover image information from getimagesize

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

◆ $_userId

$_userId CategoryForm::$_userId

int The current user ID

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


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