Semantic MediaWiki and related extensions
|
Public Member Functions | |
setSemanticTypeHook ( $type, $is_list, $class_name, $default_args) | |
setCargoTypeHook ( $type, $is_list, $class_name, $default_args) | |
setInputTypeHook ( $input_type, $class_name, $default_args) | |
registerInputType ( $inputTypeClass) | |
getInputType ( $inputTypeName) | |
getDefaultInputTypeSMW ( $isList, $propertyType) | |
getDefaultInputTypeCargo ( $isList, $fieldType) | |
getPossibleInputTypesSMW ( $isList, $propertyType) | |
getPossibleInputTypesCargo ( $isList, $fieldType) | |
getAllInputTypes () | |
showDeletionLog ( $out) | |
strReplaceFirst ( $search, $replace, $subject) | |
multipleTemplateStartHTML ( $tif) | |
multipleTemplateInstanceTableHTML ( $form_is_disabled, $mainText) | |
multipleTemplateInstanceHTML ( $template_in_form, $form_is_disabled, &$section) | |
multipleTemplateEndHTML ( $template_in_form, $form_is_disabled, $section) | |
tableHTML ( $tif, $instanceNum) | |
spreadsheetHTML ( $tif) | |
getStringForCurrentTime ( $includeTime, $includeTimezone) | |
formHTML ( $form_def, $form_submitted, $source_is_page, $form_id=null, $existing_page_content=null, $page_name=null, $page_name_formula=null, $is_query=false, $is_embedded=false) | |
formFieldHTML ( $form_field, $cur_value) | |
Static Public Member Functions | |
static | placeholderFormat ( $templateName, $fieldName) |
static | makePlaceholderInFormHTML ( $str) |
static | getStringFromPassedInArray ( $value, $delimiter) |
static | displayLoadingImage () |
Public Attributes | |
$mSemanticTypeHooks | |
$mCargoTypeHooks | |
$mInputTypeHooks | |
$standardInputsIncluded | |
$mPageTitle | |
PFFormPrinter::formFieldHTML | ( | $form_field, | |
$cur_value | |||
) |
Create the HTML to display this field within a form.
PFFormField | $form_field | |
string | $cur_value |
PFFormPrinter::formHTML | ( | $form_def, | |
$form_submitted, | |||
$source_is_page, | |||
$form_id = null , |
|||
$existing_page_content = null , |
|||
$page_name = null , |
|||
$page_name_formula = null , |
|||
$is_query = false , |
|||
$is_embedded = false |
|||
) |
This function is the real heart of the entire Page Forms extension. It handles two main actions: (1) displaying a form on the screen, given a form definition and possibly page contents (if an existing page is being edited); and (2) creating actual page contents, if the form was already submitted by the user.
It also does some related tasks, like figuring out the page name (if only a page formula exists).
string | $form_def | |
bool | $form_submitted | |
bool | $source_is_page | |
string | null | $form_id | |
string | null | $existing_page_content | |
string | null | $page_name | |
string | null | $page_name_formula | |
bool | $is_query | |
bool | $is_embedded |
PFFormPrinter::getStringForCurrentTime | ( | $includeTime, | |
$includeTimezone | |||
) |
Get a string representing the current time, for the time zone specified in the wiki.
string | $includeTime | |
string | $includeTimezone |
|
static |
If the value passed in for a certain field, when a form is submitted, is an array, then it might be from a checkbox or date input - in that case, convert it into a string.
string | $value | |
string | $delimiter |
PFFormPrinter::multipleTemplateEndHTML | ( | $template_in_form, | |
$form_is_disabled, | |||
$section | |||
) |
Creates the end of the HTML for a multiple-instance template - including the sections necessary for adding additional instances.
PFTemplateInForm | $template_in_form | |
bool | $form_is_disabled | |
string | $section |
PFFormPrinter::multipleTemplateInstanceHTML | ( | $template_in_form, | |
$form_is_disabled, | |||
& | $section | ||
) |
Creates the HTML for a single instance of a multiple-instance template.
PFTemplateInForm | $template_in_form | |
bool | $form_is_disabled | |
string | &$section |
PFFormPrinter::multipleTemplateInstanceTableHTML | ( | $form_is_disabled, | |
$mainText | |||
) |
Creates the HTML for the inner table for every instance of a multiple-instance template in the form.
bool | $form_is_disabled | |
string | $mainText |
PFFormPrinter::registerInputType | ( | $inputTypeClass | ) |
Register all information about the passed-in form input class.
string | $inputTypeClass | The full qualified class name representing the new input. Must be derived from PFFormInput. |
PFFormPrinter::showDeletionLog | ( | $out | ) |
Show the set of previous deletions for the page being edited.
OutputPage | $out |
PFFormPrinter::strReplaceFirst | ( | $search, | |
$replace, | |||
$subject | |||
) |
Like PHP's str_replace(), but only replaces the first found instance - unfortunately, str_replace() doesn't allow for that. This code is basically copied directly from http://www.php.net/manual/en/function.str-replace.php#86177
string | $search | |
string | $replace | |
string | $subject |