From 23aa23b68b2a773d22d42d7b87020c558a13cba0 Mon Sep 17 00:00:00 2001 From: ksarabia Date: Tue, 7 Feb 2023 10:43:16 -0600 Subject: [PATCH] Remove the Group::insertAfter() function in Minerva Bug: T311895 Change-Id: Ice77bac6fb6ba948f3054c18d558f79ffd46506d --- includes/Menu/Group.php | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/includes/Menu/Group.php b/includes/Menu/Group.php index b3692c01f..f238d1d4c 100644 --- a/includes/Menu/Group.php +++ b/includes/Menu/Group.php @@ -22,7 +22,6 @@ namespace MediaWiki\Minerva\Menu; use DomainException; use MediaWiki\Minerva\Menu\Entries\IMenuEntry; -use MediaWiki\Minerva\Menu\Entries\SingleMenuEntry; /** * Model for a menu that can be presented in a skin. @@ -128,34 +127,6 @@ final class Group { throw new DomainException( "The \"{$name}\" entry doesn't exist." ); } - /** - * Insert an entry after an existing one. - * @deprecated since 1.39 - * @param string $targetName The name of the existing entry to insert - * the new entry after - * @param string $name The name of the new entry - * @param string $text Entry label - * @param string $url The URL entry points to - * @param string $className Optional HTML classes - * @param string|null $icon defaults to $name if not specified - * @param bool $trackable Whether an entry will track clicks or not. Default is false. - * @param bool $isJSOnly Whether the entry works without JS - * @throws DomainException When the existing entry doesn't exist - */ - public function insertAfter( $targetName, $name, $text, $url, - $className = '', $icon = null, $trackable = false, $isJSOnly = false - ) { - wfDeprecated( __METHOD__, '1.39' ); - $this->throwIfNotUnique( $name ); - $index = $this->search( $targetName ); - - $entry = SingleMenuEntry::create( $name, $text, $url, $className, $icon, $trackable ); - if ( $isJSOnly ) { - $entry->setJSOnly(); - } - array_splice( $this->entries, $index + 1, 0, [ $entry ] ); - } - /** * @param string $targetName * @return IMenuEntry