+ switch ( $restriction->getType() ) {
+ case PageRestriction::TYPE:
+ if ( $restriction->getTitle() ) {
+ $items[$restriction->getType()][] = Html::rawElement(
+ 'li',
+ [],
+ Linker::link( $restriction->getTitle() )
+ );
+ }
+ break;
+ case NamespaceRestriction::TYPE:
+ $text = $restriction->getValue() === NS_MAIN
+ ? $this->msg( 'blanknamespace' )
+ : $this->getLanguage()->getFormattedNsText(
+ $restriction->getValue()
+ );
+ $items[$restriction->getType()][] = Html::rawElement(
+ 'li',
+ [],
+ Linker::link(
+ SpecialPage::getTitleValueFor( 'Allpages' ),
+ $text,
+ [],
+ [
+ 'namespace' => $restriction->getValue()
+ ]
+ )
+ );
+ break;