SFFormLinker Class Reference

List of all members.

Static Public Member Functions

static getIncomingProperties ($title)
 Gets the set of all properties that point to this page, anywhere in the wiki.
static getPagePropertiesOfPage ($title)
 Gets the properties pointing from the current page to this one.
static getFormsThatPagePointsTo ($page_name, $page_namespace, $form_connection_type)
 Gets the forms specified, if any, of either type "default form", "alternate form", or "default form for page", for a specific page (which should be a category, property, or namespace page).
static createLinkedPage ($title, $incoming_properties)
 Automatically creates a page that's red-linked from the page being viewed, if there's a property pointing from anywhere to that page that's defined with the 'Creates pages with form' special property.
static getFormEditLinkForPage ($target_page_title, $page_name, $page_namespace)
 Helper function for formEditLink() - gets the 'default form' and 'alternate form' properties for a page, and creates the corresponding Special:FormEdit link, if any such properties are defined.
static formEditLink ($title, $incoming_properties)
 Returns the URL for the Special:FormEdit page for a specific page, given its default and alternate form(s) - we can't just point to '&action=formedit', because that one doesn't reflect alternate forms.
static setBrokenLink ($linker, $target, $options, $text, &$attribs, &$ret)
 Sets the URL for form-based creation of a nonexistent (broken-linked, AKA red-linked) page.
static getDefaultFormsForPage ($title)
 Get the form(s) used to edit this page - either:
  • the default form(s) for the page itself, if there are any; or
  • the default form(s) for a category that this article belongs to, if there are any; or
  • the default form(s) for the article's namespace, if there are any.


Public Attributes

const DEFAULT_FORM = 1
const ALTERNATE_FORM = 2
const PAGE_DEFAULT_FORM = 3
const AUTO_CREATE_FORM = 4

Static Public Attributes

static $mLinkedForms = array()
static $mLinkedPages = array()
static $mLinkedPagesRetrieved = false


Detailed Description

Definition at line 13 of file SF_FormLinker.php.


Member Function Documentation

static SFFormLinker::getIncomingProperties ( title  )  [static]

Gets the set of all properties that point to this page, anywhere in the wiki.

Definition at line 28 of file SF_FormLinker.php.

References $store, SMWDIWikiPage::newFromTitle(), smwfGetStore(), and SFUtils::titleString().

static SFFormLinker::getPagePropertiesOfPage ( title  )  [static]

Gets the properties pointing from the current page to this one.

Definition at line 56 of file SF_FormLinker.php.

References $store, SMWDIWikiPage::newFromTitle(), and smwfGetStore().

static SFFormLinker::getFormsThatPagePointsTo ( page_name,
page_namespace,
form_connection_type 
) [static]

Gets the forms specified, if any, of either type "default form", "alternate form", or "default form for page", for a specific page (which should be a category, property, or namespace page).

Definition at line 97 of file SF_FormLinker.php.

References $store, SFUtils::getSMWPropertyValues(), and smwfGetStore().

static SFFormLinker::createLinkedPage ( title,
incoming_properties 
) [static]

Automatically creates a page that's red-linked from the page being viewed, if there's a property pointing from anywhere to that page that's defined with the 'Creates pages with form' special property.

Definition at line 157 of file SF_FormLinker.php.

References $wgTitle.

static SFFormLinker::getFormEditLinkForPage ( target_page_title,
page_name,
page_namespace 
) [static]

Helper function for formEditLink() - gets the 'default form' and 'alternate form' properties for a page, and creates the corresponding Special:FormEdit link, if any such properties are defined.

Definition at line 199 of file SF_FormLinker.php.

References SFUtils::getSpecialPage(), and SFUtils::titleURLString().

static SFFormLinker::formEditLink ( title,
incoming_properties 
) [static]

Returns the URL for the Special:FormEdit page for a specific page, given its default and alternate form(s) - we can't just point to '&action=formedit', because that one doesn't reflect alternate forms.

Definition at line 231 of file SF_FormLinker.php.

static SFFormLinker::setBrokenLink ( linker,
target,
options,
text,
&$  attribs,
&$  ret 
) [static]

Sets the URL for form-based creation of a nonexistent (broken-linked, AKA red-linked) page.

Definition at line 261 of file SF_FormLinker.php.

References $sfgRedLinksCheckOnlyLocalProps, and $wgTitle.

static SFFormLinker::getDefaultFormsForPage ( title  )  [static]

Get the form(s) used to edit this page - either:

  • the default form(s) for the page itself, if there are any; or
  • the default form(s) for a category that this article belongs to, if there are any; or
  • the default form(s) for the article's namespace, if there are any.

Definition at line 302 of file SF_FormLinker.php.

References SFUtils::getCategoriesForPage(), and SFPageSchemas::getFormName().

Referenced by SFFormEditAction::displayForm(), SFFormEditAction::displayTab(), SFFormStart::doRedirect(), and SFAutoeditAPI::storeSemanticData().


Member Data Documentation

Definition at line 14 of file SF_FormLinker.php.

Definition at line 15 of file SF_FormLinker.php.

Definition at line 16 of file SF_FormLinker.php.

Definition at line 17 of file SF_FormLinker.php.

SFFormLinker::$mLinkedForms = array() [static]

Definition at line 20 of file SF_FormLinker.php.

SFFormLinker::$mLinkedPages = array() [static]

Definition at line 21 of file SF_FormLinker.php.

SFFormLinker::$mLinkedPagesRetrieved = false [static]

Definition at line 22 of file SF_FormLinker.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