2022-12-07 00:42:31 +00:00
|
|
|
<?php
|
|
|
|
namespace MediaWiki\Skins\Vector\Components;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* VectorComponentTableOfContents component
|
|
|
|
*/
|
|
|
|
class VectorComponentTableOfContents implements VectorComponent {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @inheritDoc
|
|
|
|
*/
|
|
|
|
public function getTemplateData(): array {
|
2022-12-07 01:05:22 +00:00
|
|
|
$pinnableElementName = 'vector-toc';
|
|
|
|
$pinnedContainer = new VectorComponentPinnedContainer( $pinnableElementName );
|
|
|
|
$pinnableElement = new VectorComponentPinnableElement( $pinnableElementName );
|
|
|
|
return $pinnableElement->getTemplateData() + $pinnedContainer->getTemplateData();
|
2022-12-07 00:42:31 +00:00
|
|
|
}
|
|
|
|
}
|