mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-12-01 18:57:04 +00:00
c10ef66e6e
* 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
19 lines
531 B
PHP
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();
|
|
}
|
|
}
|