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

Public Member Functions

 __construct ($pressId, $spotlightId=null)
 
 _isValidSpotlightType ($type)
 
 execute (... $functionArgs)
 
 fetch ($request, $template=null, $display=false)
 
 getAssocTitle ($assocId, $assocType)
 
 getPressId ()
 
 getSpotlightId ()
 
 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 ()
 
 getLocaleFieldNames ()
 
 getRequiredLocale ()
 
 getTemplate ()
 
 initData ()
 
 isValid ()
 
 readUserVars ($vars)
 
 setData ($key, $value=null)
 
 setDefaultFormLocale ($defaultLocale)
 
 setTemplate ($template)
 
 validate ($callHooks=true)
 

Data Fields

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

Detailed Description

Form for reading/creating/editing spotlight items.

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

Constructor & Destructor Documentation

◆ __construct()

SpotlightForm::__construct (   $pressId,
  $spotlightId = null 
)

Constructor

Parameters
$pressIdint
$spotlightIdint leave as default for new spotlight

Definition at line 40 of file SpotlightForm.inc.php.

References Form\addCheck().

Member Function Documentation

◆ _isValidSpotlightType()

SpotlightForm::_isValidSpotlightType (   $type)

Internal function for spotlight type verification.

Parameters
int$type
Returns
boolean

Definition at line 177 of file SpotlightForm.inc.php.

◆ execute()

SpotlightForm::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 96 of file SpotlightForm.inc.php.

References DAORegistry\getDAO(), Form\getData(), getPressId(), and getSpotlightId().

◆ fetch()

SpotlightForm::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 63 of file SpotlightForm.inc.php.

References DAORegistry\getDAO(), PKPTemplateManager\getManager(), getPressId(), and getSpotlightId().

◆ getAssocTitle()

SpotlightForm::getAssocTitle (   $assocId,
  $assocType 
)

Fetch the title of the Spotlight item, based on the assocType and pressId

Parameters
int$assocId
int$assocType

Definition at line 153 of file SpotlightForm.inc.php.

References fatalError(), PKPServices\get(), DAORegistry\getDAO(), and getPressId().

◆ getPressId()

SpotlightForm::getPressId ( )

Fetch the press Id for this form.

Returns
int $pressId

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

References $_pressId.

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

◆ getSpotlightId()

SpotlightForm::getSpotlightId ( )

Fetch the spotlight Id for this form.

Returns
int $spotlightId

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

References $_spotlightId.

Referenced by execute(), and fetch().

◆ readInputData()

SpotlightForm::readInputData ( )
See also
Form::readInputData()

Reimplemented from Form.

Definition at line 89 of file SpotlightForm.inc.php.

References Form\readUserVars().

Field Documentation

◆ $_pressId

pressId SpotlightForm::$_pressId

Definition at line 33 of file SpotlightForm.inc.php.

Referenced by getPressId().

◆ $_spotlightId

spotlightId SpotlightForm::$_spotlightId

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

Referenced by getSpotlightId().


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