Beispiel #1
0
 /**
  * Renders the category-page like view which shows the usage of this
  * layer page in other pages.
  *
  * @since 3.0
  */
 public function renderUsage()
 {
     global $wgOut;
     $out = '';
     $titles = $this->getUsageTitles();
     $viewer = new CategoryViewer($this->mTitle, $this->getContext());
     $viewer->limit = 9999;
     // just overwrite the default limit of pages displayed in a normal category
     // now add apges in sorted order to category viewer:
     foreach ($titles as $title) {
         $viewer->addPage($title, $title->getPrefixedText(), null);
     }
     //$wgOut->addHTML( $viewer->formatList( $viewer->articles, '' ) );
     $out = "<div id=\"mw-pages\">\n";
     $out .= '<h2>' . wfMessage('maps-layerpage-usage', $this->mTitle->getText())->text() . "</h2>\n";
     if (!empty($viewer->articles)) {
         $out .= $viewer->formatList($viewer->articles, $viewer->articles_start_char);
     } else {
         $out .= wfMessage('maps-layerpage-nousage')->text();
     }
     $out .= "\n</div>";
     $wgOut->addHTML($out);
 }