Semantic MediaWiki and related extensions
Static Public Member Functions | Static Protected Member Functions | List of all members
PFFormUtils Class Reference

Static Public Member Functions

static unhandledFieldsHTML ( $template_in_form)
 
static summaryInputHTML ( $is_disabled, $label=null, $attr=array(), $value='')
 
static minorEditInputHTML ( $form_submitted, $is_disabled, $is_checked, $label=null, $attrs=array())
 
static watchInputHTML ( $form_submitted, $is_disabled, $is_checked=false, $label=null, $attrs=array())
 
static buttonHTML ( $name, $value, $type, $attrs)
 
static saveButtonHTML ( $is_disabled, $label=null, $attr=array())
 
static saveAndContinueButtonHTML ( $is_disabled, $label=null, $attr=array())
 
static showPreviewButtonHTML ( $is_disabled, $label=null, $attr=array())
 
static showChangesButtonHTML ( $is_disabled, $label=null, $attr=array())
 
static cancelLinkHTML ( $is_disabled, $label=null, $attr=array())
 
static runQueryButtonHTML ( $is_disabled=false, $label=null, $attr=array())
 
static formBottom ( $form_submitted, $is_disabled)
 
static getPreloadedText ( $preload)
 
static queryFormBottom ()
 
static getMonthNames ()
 
static setGlobalVarsForSpreadsheet ()
 
static getFormDefinition (Parser $parser, $form_def=null, $form_id=null)
 
static purgeCache (WikiPage $wikipage)
 
static getFormCache ()
 
static getCacheKey ( $formId, $parser=null)
 
static headerHTML ( $header_name, $header_level=2)
 
static getChangedIndex ( $i, $new_item_loc, $deleted_item_loc)
 

Static Protected Member Functions

static getFormDefinitionFromCache ( $form_id, Parser $parser)
 
static cacheFormDefinition ( $form_id, $form_def, Parser $parser)
 

Member Function Documentation

◆ buttonHTML()

static PFFormUtils::buttonHTML (   $name,
  $value,
  $type,
  $attrs 
)
static

Helper function to display a simple button

Parameters
string$name
string$value
string$type
array$attrs
Returns
string

◆ cacheFormDefinition()

static PFFormUtils::cacheFormDefinition (   $form_id,
  $form_def,
Parser  $parser 
)
staticprotected

Store a form definition in cache

Parameters
string$form_id
string$form_def
Parser$parser

◆ getCacheKey()

static PFFormUtils::getCacheKey (   $formId,
  $parser = null 
)
static

Get a cache key.

Parameters
string$formId
Parser | null$parserProvide parser to get unique cache key
Returns
string

◆ getChangedIndex()

static PFFormUtils::getChangedIndex (   $i,
  $new_item_loc,
  $deleted_item_loc 
)
static

Get the changed index if a new template or section was inserted before the end, or one was deleted in the form

Parameters
int$i
int | null$new_item_loc
int | null$deleted_item_loc
Returns
int

◆ getFormCache()

static PFFormUtils::getFormCache ( )
static

Get the cache object used by the form cache

Returns
BagOStuff

◆ getFormDefinition()

static PFFormUtils::getFormDefinition ( Parser  $parser,
  $form_def = null,
  $form_id = null 
)
static

Parse the form definition and return it

Parameters
Parser$parser
string | null$form_def
string | null$form_id
Returns
string

◆ getFormDefinitionFromCache()

static PFFormUtils::getFormDefinitionFromCache (   $form_id,
Parser  $parser 
)
staticprotected

Get a form definition from cache

Parameters
string$form_id
Parser$parser
Returns
string|null

◆ headerHTML()

static PFFormUtils::headerHTML (   $header_name,
  $header_level = 2 
)
static

Get section header HTML

Parameters
string$header_name
int$header_level
Returns
string

◆ purgeCache()

static PFFormUtils::purgeCache ( WikiPage  $wikipage)
static

Deletes the form definition associated with the given wiki page from the main cache.

Hooks: ArticlePurge, PageContentSave

Parameters
WikiPage$wikipage
Returns
bool

◆ queryFormBottom()

static PFFormUtils::queryFormBottom ( )
static

Used by 'RunQuery' page

Returns
string

◆ unhandledFieldsHTML()

static PFFormUtils::unhandledFieldsHTML (   $template_in_form)
static

Add a hidden input for each field in the template call that's not handled by the form itself

Parameters
PFTemplateInForm | null$template_in_form
Returns
string

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

About | General disclaimer | Privacy policy