SFFormPrinter Class Reference

List of all members.

Public Member Functions

 __construct ()
 setSemanticTypeHook ($type, $is_list, $function_name, $default_args)
 setInputTypeHook ($input_type, $function_name, $default_args)
 registerInputType ($inputTypeClass)
 Register all information about the passed-in form input class.
 getInputType ($inputTypeName)
 getDefaultInputType ($isList, $propertyType)
 getPossibleInputTypes ($isList, $propertyType)
 getAllInputTypes ()
 showDeletionLog ($out)
 Show the set of previous deletions for the page being added.
 strReplaceFirst ($search, $replace, $subject)
 Like PHP's str_replace(), but only replaces the first found instance - unfortunately, str_replace() doesn't allow for that.
 multipleTemplateInstanceTableHTML ($form_is_disabled, $mainText)
 Creates the HTML for the inner table for every instance of a multiple-instance template in the form.
 multipleTemplateInstanceHTML ($form_is_disabled, $all_instances_printed, &$section, $instance_num, $add_button_text)
 Creates the HTML for a single instance of a multiple-instance template; plus the end tags for the full multiple-instance HTML.
 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 Semantic Forms extension.
 formFieldHTML ($form_field, $cur_value)
 Create the HTML and Javascript to display this field within a form.

Static Public Member Functions

static placeholderFormat ($templateName, $fieldName)
static makePlaceholderInWikiText ($str)
static makePlaceholderInFormHTML ($str)

Public Attributes

 $mSemanticTypeHooks
 $mInputTypeHooks
 $standardInputsIncluded
 $mPageTitle


Detailed Description

Definition at line 16 of file SF_FormPrinter.php.


Constructor & Destructor Documentation

SFFormPrinter::__construct (  ) 

Definition at line 23 of file SF_FormPrinter.php.

References registerInputType().


Member Function Documentation

SFFormPrinter::setSemanticTypeHook ( type,
is_list,
function_name,
default_args 
)

Definition at line 52 of file SF_FormPrinter.php.

Referenced by registerInputType().

SFFormPrinter::setInputTypeHook ( input_type,
function_name,
default_args 
)

Definition at line 56 of file SF_FormPrinter.php.

Referenced by registerInputType().

SFFormPrinter::registerInputType ( inputTypeClass  ) 

Register all information about the passed-in form input class.

Parameters:
Class $inputTypeClass The class representing the new input. Must be derived from SFFormInput.

Definition at line 66 of file SF_FormPrinter.php.

References setInputTypeHook(), and setSemanticTypeHook().

Referenced by __construct().

SFFormPrinter::getInputType ( inputTypeName  ) 

Definition at line 114 of file SF_FormPrinter.php.

Referenced by formFieldHTML().

SFFormPrinter::getDefaultInputType ( isList,
propertyType 
)

Definition at line 122 of file SF_FormPrinter.php.

SFFormPrinter::getPossibleInputTypes ( isList,
propertyType 
)

Definition at line 138 of file SF_FormPrinter.php.

SFFormPrinter::getAllInputTypes (  ) 

Definition at line 154 of file SF_FormPrinter.php.

SFFormPrinter::showDeletionLog ( out  ) 

Show the set of previous deletions for the page being added.

This function is copied almost exactly from EditPage::showDeletionLog() - unfortunately, neither that function nor Article::showDeletionLog() can be called from here, since they're both protected.

Definition at line 165 of file SF_FormPrinter.php.

Referenced by formHTML().

SFFormPrinter::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

  • this might make sense in the SFUtils class, if it's useful in other places.

Definition at line 207 of file SF_FormPrinter.php.

Referenced by formHTML().

static SFFormPrinter::placeholderFormat ( templateName,
fieldName 
) [static]

Definition at line 218 of file SF_FormPrinter.php.

static SFFormPrinter::makePlaceholderInWikiText ( str  )  [static]

Definition at line 222 of file SF_FormPrinter.php.

static SFFormPrinter::makePlaceholderInFormHTML ( str  )  [static]

Definition at line 226 of file SF_FormPrinter.php.

SFFormPrinter::multipleTemplateInstanceTableHTML ( form_is_disabled,
mainText 
)

Creates the HTML for the inner table for every instance of a multiple-instance template in the form.

Definition at line 234 of file SF_FormPrinter.php.

References $sfgScriptPath, and END.

Referenced by multipleTemplateInstanceHTML().

SFFormPrinter::multipleTemplateInstanceHTML ( form_is_disabled,
all_instances_printed,
&$  section,
instance_num,
add_button_text 
)

Creates the HTML for a single instance of a multiple-instance template; plus the end tags for the full multiple-instance HTML.

Definition at line 270 of file SF_FormPrinter.php.

References END, and multipleTemplateInstanceTableHTML().

Referenced by formHTML().

SFFormPrinter::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 Semantic 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).

Definition at line 327 of file SF_FormPrinter.php.

References $sfg24HourTime, $sfgDependentFields, $sfgFieldProperties, $sfgRunQueryFormAtTop, $wgTitle, SFFormUtils::addUnhandledFields(), SFFormUtils::cancelLinkHTML(), SFTemplateInForm::create(), SFFormField::createFromDefinition(), END, SFFormUtils::formBottom(), formFieldHTML(), SFUtils::getAllPagesForCategory(), SFUtils::getAllPagesForConcept(), SFUtils::getAllPagesForNamespace(), SFUtils::getAllValuesForProperty(), SFFormUtils::getFormDefinition(), SFUtils::getFormTagComponents(), SFFormInput::getHTML(), SFFormUtils::getMonthNames(), SFFormUtils::getPreloadedText(), SFFormUtils::getShowFCKEditor(), SFUtils::getWordForYesOrNo(), SFFormUtils::mainFCKJavascript(), SMWPropertyValue::makeUserProperty(), SFFormUtils::minorEditInputHTML(), multipleTemplateInstanceHTML(), SFFormUtils::prepareTextForFCK(), SFFormUtils::queryFormBottom(), SFFormUtils::runQueryButtonHTML(), SFFormUtils::saveAndContinueButtonHTML(), SFFormUtils::saveButtonHTML(), SFFormUtils::showChangesButtonHTML(), showDeletionLog(), SFFormUtils::showPreviewButtonHTML(), strReplaceFirst(), SFFormUtils::summaryInputHTML(), SFFormUtils::unhandledFieldsHTML(), and SFFormUtils::watchInputHTML().

SFFormPrinter::formFieldHTML ( form_field,
cur_value 
)

Create the HTML and Javascript to display this field within a form.

Definition at line 1598 of file SF_FormPrinter.php.

References SFTextInput::getHTML(), and getInputType().

Referenced by formHTML().


Member Data Documentation

SFFormPrinter::$mSemanticTypeHooks

Definition at line 18 of file SF_FormPrinter.php.

SFFormPrinter::$mInputTypeHooks

Definition at line 19 of file SF_FormPrinter.php.

SFFormPrinter::$standardInputsIncluded

Definition at line 20 of file SF_FormPrinter.php.

SFFormPrinter::$mPageTitle

Definition at line 21 of file SF_FormPrinter.php.


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

Generated on Sun Mar 18 07:15:42 2012 for Semantic MediaWiki by  doxygen 1.5.6