/** * @param EntityId|null $entityId * * @return string HTML */ private function getHtmlForLabelDescriptionAliasesEditSection(EntityId $entityId = null) { if ($this->sectionEditLinkGenerator === null) { return ''; } return $this->sectionEditLinkGenerator->getLabelDescriptionAliasesEditSection($this->languageCode, $entityId); }
/** * @param Statement[] $statements * @param string $addStatementHtml * * @return string HTML */ private function getHtmlForStatementListView(array $statements, $addStatementHtml) { $statementViewsHtml = ''; foreach ($statements as $statement) { $statementViewsHtml .= $this->claimHtmlGenerator->getHtmlForClaim($statement, $this->editSectionGenerator->getStatementEditSection($statement instanceof Statement ? $statement : new Statement($statement))); } return $this->templateFactory->render('wikibase-statementlistview', $statementViewsHtml, $addStatementHtml); }
/** * Builds and returns the HTML representing a group of a WikibaseEntity's site-links. * * @param SiteLink[] $siteLinks the site links to render * @param ItemId|null $itemId The id of the item * @param string $group a site group ID * * @return string */ private function getHtmlForSiteLinkGroup(array $siteLinks, ItemId $itemId = null, $group) { $siteLinksForTable = $this->getSiteLinksForTable($this->getSitesForGroup($group), $siteLinks); return $this->templateFactory->render('wikibase-sitelinkgroupview', htmlspecialchars('sitelinks-' . $group, ENT_QUOTES), wfMessage('wikibase-sitelinks-' . $group)->parse(), '', $this->templateFactory->render('wikibase-sitelinklistview', $this->getHtmlForSiteLinks($siteLinksForTable, $group === 'special')), htmlspecialchars($group), $this->sectionEditLinkGenerator->getSiteLinksEditSection($itemId), count($siteLinksForTable) > 1 ? ' mw-collapsible' : ''); }