mediawiki-skins-Vector/includes/Components/VectorComponentTableOfContents.php
Jon Robson c10ef66e6e Refactor: PageTools composes several different components
* Introduce Dropdownmenu, PinnableElement and PinnedContainer components

Additional changes:
* Drops unused has-multiple-menus
* Update TableOfContents to use PinnedContainer and PinnableElement

Bug: T317900
Change-Id: I0a740f8543831e266f2b1b874b40e44c8241d4cb
2022-12-12 22:17:24 +00:00

19 lines
531 B
PHP

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