Open Monograph Press  3.3.0
ChapterForm Class Reference
Inheritance diagram for ChapterForm:
Form

Public Member Functions

 __construct ($monograph, $publication, $chapter)
 
 execute (... $functionParams)
 
 fetch ($request, $template=null, $display=false)
 
 getChapter ()
 
 getMonograph ()
 
 getPublication ()
 
 initData ()
 
 readInputData ()
 
 setChapter ($chapter)
 
 setMonograph ($monograph)
 
 setPublication ($publication)
 
- 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 ()
 
 getLocaleFieldNames ()
 
 getRequiredLocale ()
 
 getTemplate ()
 
 isValid ()
 
 readUserVars ($vars)
 
 setData ($key, $value=null)
 
 setDefaultFormLocale ($defaultLocale)
 
 setTemplate ($template)
 
 validate ($callHooks=true)
 

Data Fields

 $_chapter
 
 $_monograph
 
 $_publication
 
- Data Fields inherited from Form
 $_checks
 
 $_data
 
 $_errors
 
 $_template
 
 $cssValidation
 
 $defaultLocale
 
 $errorFields
 
 $errorsArray
 
 $formSectionErrors
 
 $requiredLocale
 
 $supportedLocales
 

Detailed Description

Form for adding/editing a chapter stores/retrieves from an associative array.

Definition at line 19 of file ChapterForm.inc.php.

Constructor & Destructor Documentation

◆ __construct()

ChapterForm::__construct (   $monograph,
  $publication,
  $chapter 
)

Constructor.

Parameters
$monographMonograph
$publicationPublication
$chapterChapter

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

References Form\addCheck(), setChapter(), Form\setDefaultFormLocale(), setMonograph(), and setPublication().

Member Function Documentation

◆ execute()

ChapterForm::execute (   $functionParams)

Save chapter

See also
Form::execute()

Reimplemented from Form.

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

References PKPApplication\get(), getChapter(), DAORegistry\getDAO(), Form\getData(), getMonograph(), getPublication(), and setChapter().

◆ fetch()

ChapterForm::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 137 of file ChapterForm.inc.php.

References PKPServices\get(), getChapter(), DAORegistry\getDAO(), PKPTemplateManager\getManager(), getMonograph(), and getPublication().

◆ getChapter()

ChapterForm::getChapter ( )

Get the Chapter associated with this form

Returns
Chapter

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

References $_chapter.

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

◆ getMonograph()

ChapterForm::getMonograph ( )

Get the monograph associated with this chapter grid.

Returns
Monograph

Definition at line 59 of file ChapterForm.inc.php.

References $_monograph.

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

◆ getPublication()

ChapterForm::getPublication ( )

Get the publication associated with this chapter grid.

Returns
Publication

Definition at line 75 of file ChapterForm.inc.php.

References $_publication.

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

◆ initData()

ChapterForm::initData ( )

Initialize form data from the associated chapter.

Parameters
$chapterChapter

Reimplemented from Form.

Definition at line 110 of file ChapterForm.inc.php.

References getChapter(), getMonograph(), getPublication(), AppLocale\requireComponents(), and Form\setData().

◆ readInputData()

ChapterForm::readInputData ( )

Assign form data to user-submitted data.

See also
Form::readInputData()

Reimplemented from Form.

Definition at line 194 of file ChapterForm.inc.php.

References Form\readUserVars().

◆ setChapter()

ChapterForm::setChapter (   $chapter)

Set the Chapter associated with this form

Parameters
$chapterChapter

Definition at line 99 of file ChapterForm.inc.php.

Referenced by __construct(), and execute().

◆ setMonograph()

ChapterForm::setMonograph (   $monograph)

Set the monograph associated with this chapter grid.

Parameters
$monographMonograph

Definition at line 67 of file ChapterForm.inc.php.

Referenced by __construct().

◆ setPublication()

ChapterForm::setPublication (   $publication)

Set the publication associated with this chapter grid.

Parameters
$publicationPublication

Definition at line 83 of file ChapterForm.inc.php.

Referenced by __construct().

Field Documentation

◆ $_chapter

ChapterForm::$_chapter

Chapter the chapter being edited

Definition at line 27 of file ChapterForm.inc.php.

Referenced by getChapter().

◆ $_monograph

ChapterForm::$_monograph

The monograph associated with the chapter being edited

Definition at line 21 of file ChapterForm.inc.php.

Referenced by getMonograph().

◆ $_publication

ChapterForm::$_publication

The publication associated with the chapter being edited

Definition at line 24 of file ChapterForm.inc.php.

Referenced by getPublication().


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