Semantic MediaWiki and related extensions
Public Member Functions | Protected Attributes | List of all members
SMW\DataValues\InfoLinksProvider Class Reference

Public Member Functions

 __construct (DataValue $dataValue, PropertySpecificationLookup $propertySpecificationLookup)
 
 init ()
 
 disableServiceLinks ()
 
 setCompactLink ( $compactLink)
 
 addInfolink (Infolink $infoLink)
 
 setServiceLinkParameters ( $serviceLinkParameters)
 
 createInfoLinks ()
 
 getInfolinkText ( $outputformat, $linker=null)
 
 addServiceLinks ()
 

Protected Attributes

 $infoLinks = []
 

Detailed Description

GNU GPL v2+

Since
2.4
Author
mwjames

Constructor & Destructor Documentation

◆ __construct()

SMW\DataValues\InfoLinksProvider::__construct ( DataValue  $dataValue,
PropertySpecificationLookup  $propertySpecificationLookup 
)
Since
2.4
Parameters
DataValue$dataValue
PropertySpecificationLookup$propertySpecificationLookup

Member Function Documentation

◆ addInfolink()

SMW\DataValues\InfoLinksProvider::addInfolink ( Infolink  $infoLink)

Adds a single SMWInfolink object to the infoLinks array.

Since
2.4
Parameters
Infolink$link

◆ addServiceLinks()

SMW\DataValues\InfoLinksProvider::addServiceLinks ( )

Servicelinks are special kinds of infolinks that are created from current parameters and in-wiki specification of URL templates. This method adds the current property's servicelinks found in the messages. The number and content of the parameters is depending on the datatype, and the service link message is usually crafted with a particular datatype in mind.

◆ createInfoLinks()

SMW\DataValues\InfoLinksProvider::createInfoLinks ( )

Return an array of SMWLink objects that provide additional resources for the given value. Captions can contain some HTML markup which is admissible for wiki text, but no more. Result might have no entries but is always an array.

Since
2.4

◆ disableServiceLinks()

SMW\DataValues\InfoLinksProvider::disableServiceLinks ( )
Since
2.4

◆ getInfolinkText()

SMW\DataValues\InfoLinksProvider::getInfolinkText (   $outputformat,
  $linker = null 
)

Return text serialisation of info links. Ensures more uniform layout throughout wiki (Factbox, Property pages, ...).

Parameters
integer$outputformatElement of the SMW_OUTPUT_ enum
Linker | null$linker
Returns
string

◆ init()

SMW\DataValues\InfoLinksProvider::init ( )
Since
2.4

◆ setCompactLink()

SMW\DataValues\InfoLinksProvider::setCompactLink (   $compactLink)
Since
3.0
Parameters
boolean$compactLink

◆ setServiceLinkParameters()

SMW\DataValues\InfoLinksProvider::setServiceLinkParameters (   $serviceLinkParameters)
Since
2.4
Parameters
array | false$serviceLinkParameters

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

About | General disclaimer | Privacy policy