|
Open Monograph Press
3.3.0
|
Public Member Functions | |
| __construct ($id, $method, $action, $locales) | |
| addField ($field, $position=[]) | |
| addGroup ($args, $position=[]) | |
| addPage ($args, $position=[]) | |
| addToPosition ($id, $list, $item, $position) | |
| getConfig () | |
| getField ($fieldName) | |
| getFieldConfig ($field) | |
| removeField ($fieldName) | |
| removeGroup ($groupId) | |
| removePage ($pageId) | |
Data Fields | |
| $action = '' | |
| $errors = [] | |
| $fields = [] | |
| $groups = [] | |
| $id = '' | |
| $locales = [] | |
| $method = '' | |
| $pages = [] | |
Definition at line 20 of file FormComponent.inc.php.
| PKP\components\forms\FormComponent::__construct | ( | $id, | |
| $method, | |||
| $action, | |||
| $locales | |||
| ) |
Initialize the form with config parameters
| $id | string |
| $method | string |
| $action | string |
| $locales | array |
Reimplemented in APP\components\forms\publication\PublishForm, PKP\components\forms\publication\PKPPublicationIdentifiersForm, PKP\components\forms\context\PKPSearchIndexingForm, PKP\components\forms\context\PKPInformationForm, PKP\components\forms\context\PKPMastheadForm, PKP\components\forms\context\PKPPrivacyForm, APP\components\forms\context\MastheadForm, and PKP\components\forms\context\PKPContextForm.
Definition at line 77 of file FormComponent.inc.php.
References PKP\components\forms\FormComponent\$action, PKP\components\forms\FormComponent\$id, PKP\components\forms\FormComponent\$locales, and PKP\components\forms\FormComponent\$method.
| PKP\components\forms\FormComponent::addField | ( | $field, | |
$position = [] |
|||
| ) |
Add a form field
| $field | Field |
| $position | array [ @option string One of FIELD_POSITION_BEFORE or FIELD_POSITION_AFTER @option string The field to position it before or after ] |
Definition at line 94 of file FormComponent.inc.php.
References PKP\components\forms\FormComponent\addToPosition().
Referenced by APP\components\forms\context\MetadataSettingsForm\__construct(), APP\components\forms\context\ReviewGuidanceForm\__construct(), APP\components\forms\context\UserAccessForm\__construct(), APP\components\forms\context\AppearanceAdvancedForm\__construct(), APP\components\forms\context\AppearanceSetupForm\__construct(), APP\components\forms\catalog\AddEntryForm\__construct(), PKP\components\forms\emailTemplate\PKPEmailTemplateForm\__construct(), PKP\components\forms\publication\PKPCitationsForm\__construct(), APP\components\forms\submission\AudienceForm\__construct(), PKP\components\forms\context\PKPAuthorGuidelinesForm\__construct(), PKP\components\forms\context\PKPMetadataSettingsForm\__construct(), PKP\components\forms\context\PKPDisableSubmissionsForm\__construct(), APP\components\forms\submission\PublicationDatesForm\__construct(), PKP\components\forms\context\PKPListsForm\__construct(), PKP\components\forms\context\PKPPrivacyForm\__construct(), PKP\components\forms\context\PKPReviewGuidanceForm\__construct(), PKP\components\forms\context\PKPUserAccessForm\__construct(), PKP\components\forms\site\PKPSiteConfigForm\__construct(), PKP\components\forms\publication\PKPTitleAbstractForm\__construct(), PKP\components\forms\announcement\PKPAnnouncementForm\__construct(), PKP\components\forms\context\PKPAnnouncementSettingsForm\__construct(), PKP\components\forms\context\PKPLicenseForm\__construct(), PKP\components\forms\context\PKPContextForm\__construct(), PKP\components\forms\context\PKPEmailSetupForm\__construct(), PKP\components\forms\site\PKPSiteInformationForm\__construct(), PKP\components\forms\publication\PKPMetadataForm\__construct(), PKP\components\forms\context\PKPReviewSetupForm\__construct(), PKP\components\forms\publication\PKPPublicationLicenseForm\__construct(), PKP\components\forms\context\PKPAppearanceAdvancedForm\__construct(), PKP\components\forms\site\PKPSiteAppearanceForm\__construct(), PKP\components\forms\context\PKPAppearanceSetupForm\__construct(), APP\components\forms\publication\CatalogEntryForm\__construct(), and PKP\components\forms\context\PKPThemeForm\__construct().
| PKP\components\forms\FormComponent::addGroup | ( | $args, | |
$position = [] |
|||
| ) |
Add a form group
| $args | array [ @option id string Required A unique ID for this form group @option label string A label to identify this group of fields. Will become the fieldset's <legend> @option description string A description of this group of fields. ] |
| $position | array [ @option string One of FIELD_POSITION_BEFORE or FIELD_POSITION_AFTER @option string The group to position it before or after ] |
Definition at line 145 of file FormComponent.inc.php.
References PKP\components\forms\FormComponent\addToPosition(), and fatalError().
Referenced by APP\components\forms\context\MastheadForm\__construct(), PKP\components\forms\context\PKPDateTimeForm\__construct(), PKP\components\forms\context\PKPContactForm\__construct(), PKP\components\forms\context\PKPPaymentSettingsForm\__construct(), PKP\components\forms\context\PKPInformationForm\__construct(), PKP\components\forms\context\PKPMastheadForm\__construct(), PKP\components\forms\context\PKPSearchIndexingForm\__construct(), APP\components\forms\publication\PublishForm\__construct(), PKP\components\forms\context\PKPThemeForm\getConfig(), and PKP\components\forms\FormComponent\getConfig().
| PKP\components\forms\FormComponent::addPage | ( | $args, | |
$position = [] |
|||
| ) |
Add a form page
| $args | array [ @option id string Required A unique ID for this form page @option label string The name of the page to identify it in the page list @option submitButton array Required Assoc array defining submission/next button params. Supports any param of the Button component in the UI Library. @option previousButton array Assoc array defining button params to go back to the previous page. Supports any param of the Button component in the UI Library. ] |
| $position | array [ @option string One of FIELD_POSITION_BEFORE or FIELD_POSITION_AFTER @option string The page to position it before or after ] |
Definition at line 188 of file FormComponent.inc.php.
References PKP\components\forms\FormComponent\addToPosition(), and fatalError().
Referenced by APP\components\forms\publication\PublishForm\__construct(), and PKP\components\forms\FormComponent\getConfig().
| PKP\components\forms\FormComponent::addToPosition | ( | $id, | |
| $list, | |||
| $item, | |||
| $position | |||
| ) |
Add an field, group or page to a specific position in its array
| $id | string The id of the item to position before or after |
| $list | array The list of fields, groups or pages |
| $item | array The item to insert |
| $position | string FIELD_POSITION_BEFORE or FIELD_POSITION_AFTER |
Definition at line 227 of file FormComponent.inc.php.
References PKP\components\forms\FormComponent\$id, and PKP\components\forms\FIELD_POSITION_BEFORE.
Referenced by PKP\components\forms\FormComponent\addField(), PKP\components\forms\FormComponent\addGroup(), PKP\components\forms\FormComponent\addPage(), and PKP\components\forms\context\PKPThemeForm\addThemeField().
| PKP\components\forms\FormComponent::getConfig | ( | ) |
Retrieve the configuration data to be used when initializing this handler on the frontend
Reimplemented in PKP\components\forms\context\PKPThemeForm.
Definition at line 255 of file FormComponent.inc.php.
References PKP\components\forms\FormComponent\$fields, PKP\components\forms\FormComponent\$groups, PKP\components\forms\FormComponent\addGroup(), PKP\components\forms\FormComponent\addPage(), HookRegistry\call(), AppLocale\getLocale(), and AppLocale\getPrimaryLocale().
| PKP\components\forms\FormComponent::getField | ( | $fieldName | ) |
Get a form field
| $fieldName | string |
Definition at line 122 of file FormComponent.inc.php.
| PKP\components\forms\FormComponent::getFieldConfig | ( | $field | ) |
Compile a configuration array for a single field
| $field | Field |
Definition at line 311 of file FormComponent.inc.php.
Referenced by PKP\components\forms\context\PKPThemeForm\getConfig().
| PKP\components\forms\FormComponent::removeField | ( | $fieldName | ) |
Remove a form field
| $fieldName | string |
Definition at line 109 of file FormComponent.inc.php.
| PKP\components\forms\FormComponent::removeGroup | ( | $groupId | ) |
Remove a form group
| $groupId | string |
Definition at line 163 of file FormComponent.inc.php.
Referenced by PKP\components\forms\FormComponent\removePage().
| PKP\components\forms\FormComponent::removePage | ( | $pageId | ) |
Remove a form page
| $pageId | string |
Definition at line 206 of file FormComponent.inc.php.
References PKP\components\forms\FormComponent\removeGroup().
| string FormComponent::$action = '' |
Where the form should be submitted.
Definition at line 37 of file FormComponent.inc.php.
Referenced by APP\components\forms\context\MetadataSettingsForm\__construct(), APP\components\forms\context\ReviewGuidanceForm\__construct(), APP\components\forms\context\UserAccessForm\__construct(), APP\components\forms\context\AppearanceAdvancedForm\__construct(), APP\components\forms\context\MastheadForm\__construct(), APP\components\forms\context\AppearanceSetupForm\__construct(), APP\components\forms\catalog\AddEntryForm\__construct(), PKP\components\forms\emailTemplate\PKPEmailTemplateForm\__construct(), PKP\components\forms\publication\PKPCitationsForm\__construct(), APP\components\forms\submission\AudienceForm\__construct(), PKP\components\forms\context\PKPDateTimeForm\__construct(), PKP\components\forms\context\PKPDisableSubmissionsForm\__construct(), APP\components\forms\submission\PublicationDatesForm\__construct(), PKP\components\forms\context\PKPAuthorGuidelinesForm\__construct(), PKP\components\forms\context\PKPMetadataSettingsForm\__construct(), PKP\components\forms\site\PKPSiteConfigForm\__construct(), PKP\components\forms\publication\PKPTitleAbstractForm\__construct(), PKP\components\forms\context\PKPListsForm\__construct(), PKP\components\forms\context\PKPReviewGuidanceForm\__construct(), PKP\components\forms\context\PKPPaymentSettingsForm\__construct(), PKP\components\forms\context\PKPUserAccessForm\__construct(), PKP\components\forms\context\PKPPrivacyForm\__construct(), PKP\components\forms\context\PKPContactForm\__construct(), PKP\components\forms\context\PKPInformationForm\__construct(), PKP\components\forms\context\PKPContextForm\__construct(), PKP\components\forms\announcement\PKPAnnouncementForm\__construct(), PKP\components\forms\context\PKPEmailSetupForm\__construct(), PKP\components\forms\context\PKPAnnouncementSettingsForm\__construct(), PKP\components\forms\context\PKPLicenseForm\__construct(), PKP\components\forms\context\PKPMastheadForm\__construct(), PKP\components\forms\site\PKPSiteInformationForm\__construct(), PKP\components\forms\context\PKPReviewSetupForm\__construct(), PKP\components\forms\publication\PKPMetadataForm\__construct(), PKP\components\forms\context\PKPSearchIndexingForm\__construct(), PKP\components\forms\publication\PKPPublicationLicenseForm\__construct(), PKP\components\forms\site\PKPSiteAppearanceForm\__construct(), PKP\components\forms\context\PKPAppearanceAdvancedForm\__construct(), PKP\components\forms\context\PKPAppearanceSetupForm\__construct(), APP\components\forms\publication\CatalogEntryForm\__construct(), PKP\components\forms\publication\PKPPublicationIdentifiersForm\__construct(), PKP\components\forms\context\PKPThemeForm\__construct(), APP\components\forms\publication\PublishForm\__construct(), and PKP\components\forms\FormComponent\__construct().
| array FormComponent::$errors = [] |
List of error messages
Definition at line 67 of file FormComponent.inc.php.
| array FormComponent::$fields = [] |
List of fields in this form.
Definition at line 49 of file FormComponent.inc.php.
Referenced by PKP\components\forms\context\PKPThemeForm\getConfig(), and PKP\components\forms\FormComponent\getConfig().
| array FormComponent::$groups = [] |
List of groups in this form.
Definition at line 55 of file FormComponent.inc.php.
Referenced by PKP\components\forms\FormComponent\getConfig().
| string FormComponent::$id = '' |
A unique ID for this form
Definition at line 25 of file FormComponent.inc.php.
Referenced by PKP\components\forms\FormComponent\__construct(), and PKP\components\forms\FormComponent\addToPosition().
| array FormComponent::$locales = [] |
Key/value list of languages this form should support. Key = locale code. Value = locale name
Definition at line 43 of file FormComponent.inc.php.
Referenced by APP\components\forms\context\ReviewGuidanceForm\__construct(), APP\components\forms\context\AppearanceAdvancedForm\__construct(), APP\components\forms\context\MastheadForm\__construct(), APP\components\forms\context\AppearanceSetupForm\__construct(), APP\components\forms\catalog\AddEntryForm\__construct(), PKP\components\forms\emailTemplate\PKPEmailTemplateForm\__construct(), PKP\components\forms\context\PKPAuthorGuidelinesForm\__construct(), PKP\components\forms\context\PKPDateTimeForm\__construct(), PKP\components\forms\context\PKPDisableSubmissionsForm\__construct(), PKP\components\forms\publication\PKPTitleAbstractForm\__construct(), PKP\components\forms\context\PKPListsForm\__construct(), PKP\components\forms\context\PKPPaymentSettingsForm\__construct(), PKP\components\forms\context\PKPContactForm\__construct(), PKP\components\forms\context\PKPPrivacyForm\__construct(), PKP\components\forms\context\PKPReviewGuidanceForm\__construct(), PKP\components\forms\site\PKPSiteConfigForm\__construct(), PKP\components\forms\site\PKPSiteInformationForm\__construct(), PKP\components\forms\context\PKPAnnouncementSettingsForm\__construct(), PKP\components\forms\context\PKPInformationForm\__construct(), PKP\components\forms\context\PKPLicenseForm\__construct(), PKP\components\forms\context\PKPMastheadForm\__construct(), PKP\components\forms\context\PKPContextForm\__construct(), PKP\components\forms\context\PKPEmailSetupForm\__construct(), PKP\components\forms\announcement\PKPAnnouncementForm\__construct(), PKP\components\forms\context\PKPSearchIndexingForm\__construct(), PKP\components\forms\context\PKPReviewSetupForm\__construct(), PKP\components\forms\publication\PKPMetadataForm\__construct(), PKP\components\forms\publication\PKPPublicationLicenseForm\__construct(), PKP\components\forms\context\PKPAppearanceAdvancedForm\__construct(), PKP\components\forms\site\PKPSiteAppearanceForm\__construct(), PKP\components\forms\context\PKPAppearanceSetupForm\__construct(), APP\components\forms\publication\CatalogEntryForm\__construct(), PKP\components\forms\publication\PKPPublicationIdentifiersForm\__construct(), PKP\components\forms\context\PKPThemeForm\__construct(), and PKP\components\forms\FormComponent\__construct().
| string FormComponent::$method = '' |
Form method: POST or PUT
Definition at line 31 of file FormComponent.inc.php.
Referenced by PKP\components\forms\FormComponent\__construct().
| array FormComponent::$pages = [] |
List of pages in this form.
Definition at line 61 of file FormComponent.inc.php.