[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/Ui/ -> Backlinks.php (source)

   1  <?php
   2  
   3  namespace dokuwiki\Ui;
   4  
   5  use dokuwiki\Extension\Event;
   6  use dokuwiki\Form\Form;
   7  
   8  /**
   9   * DokuWiki Backlinks Interface
  10   *
  11   * @package dokuwiki\Ui
  12   */
  13  class Backlinks extends Ui
  14  {
  15      /**
  16       * Display backlinks
  17       *
  18       * @author   Andreas Gohr <andi@splitbrain.org>
  19       * @author   Michael Klier <chi@chimeric.de>
  20       *
  21       * @return void
  22       */
  23      public function show()
  24      {
  25          global $ID;
  26          global $lang;
  27  
  28          // print intro
  29          print p_locale_xhtml('backlinks');
  30  
  31          $data = ft_backlinks($ID);
  32  
  33          if (!empty($data)) {
  34              print '<ul class="idx">';
  35              foreach ($data as $blink) {
  36                  print '<li><div class="li">';
  37                  print html_wikilink(':'.$blink,useHeading('navigation') ? null : $blink);
  38                  print '</div></li>';
  39              }
  40              print '</ul>';
  41          } else {
  42              print '<div class="level1"><p>'. $lang['nothingfound'] .'</p></div>';
  43          }
  44      }
  45  
  46  }