Wikibase
MediaWiki Wikibase extension
Wikibase\Client\DataAccess\StatementTransclusionInteractor Class Reference

Renders the main Snaks associated with a given Property on an Entity. More...

Public Member Functions

 __construct (Language $language, PropertyIdResolver $propertyIdResolver, SnaksFinder $snaksFinder, SnakFormatter $snakFormatter, EntityLookup $entityLookup, UsageAccumulator $usageAccumulator)
 
 render (EntityId $entityId, $propertyLabelOrId, array $acceptableRanks=null)
 

Private Member Functions

 formatSnaks (array $snaks)
 

Private Attributes

 $language
 
 $propertyIdResolver
 
 $snaksFinder
 
 $snakFormatter
 
 $entityLookup
 
 $usageAccumulator
 

Detailed Description

Renders the main Snaks associated with a given Property on an Entity.

Author
Marius Hoch < hoo@o.nosp@m.nlin.nosp@m.e.de >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Client\DataAccess\StatementTransclusionInteractor::__construct ( Language  $language,
PropertyIdResolver  $propertyIdResolver,
SnaksFinder  $snaksFinder,
SnakFormatter  $snakFormatter,
EntityLookup  $entityLookup,
UsageAccumulator  $usageAccumulator 
)

Member Function Documentation

◆ formatSnaks()

Wikibase\Client\DataAccess\StatementTransclusionInteractor::formatSnaks ( array  $snaks)
private
Parameters
Snak[]$snaksList of main snaks, all guaranteed to belong to the same property ID.
Returns
string wikitext

◆ render()

Wikibase\Client\DataAccess\StatementTransclusionInteractor::render ( EntityId  $entityId,
  $propertyLabelOrId,
array  $acceptableRanks = null 
)
Parameters
EntityId$entityId
string$propertyLabelOrIdproperty label or ID (pXXX)
int[] | null$acceptableRanks
Exceptions
PropertyLabelNotResolvedException
Returns
string Wikitext

Member Data Documentation

◆ $entityLookup

Wikibase\Client\DataAccess\StatementTransclusionInteractor::$entityLookup
private

◆ $language

Wikibase\Client\DataAccess\StatementTransclusionInteractor::$language
private

◆ $propertyIdResolver

Wikibase\Client\DataAccess\StatementTransclusionInteractor::$propertyIdResolver
private

◆ $snakFormatter

Wikibase\Client\DataAccess\StatementTransclusionInteractor::$snakFormatter
private

◆ $snaksFinder

Wikibase\Client\DataAccess\StatementTransclusionInteractor::$snaksFinder
private

◆ $usageAccumulator

Wikibase\Client\DataAccess\StatementTransclusionInteractor::$usageAccumulator
private

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